Add dockerfile

This commit is contained in:
Szymon Parafiński 2023-01-22 17:30:58 +01:00
parent 1ea411d432
commit d183a23c30
2 changed files with 25 additions and 1 deletions

24
dockerfile Normal file
View File

@ -0,0 +1,24 @@
FROM ubuntu:latest
RUN apt-get update -y
RUN apt-get install -y libgl1-mesa-glx
RUN apt-get install -y tesseract-ocr-pol
RUN apt-get install -y python3-pip
RUN pip3 install opencv-python
RUN pip3 install pytesseract
RUN pip3 install PyMuPDF
RUN pip3 install fastapi
RUN pip3 install python-multipart
RUN pip3 install uvicorn
# Expose the port 8000 in which our application runs
EXPOSE 8000
# Stwórzmy w kontenerze (jeśli nie istnieje) katalog /app i przejdźmy do niego (wszystkie kolejne polecenia RUN, CMD, ENTRYPOINT, COPY i ADD będą w nim wykonywane)
WORKDIR /app
COPY main.py .
CMD ["uvicorn", "--host", "0.0.0.0", "--port", "8000", "main:app"]

View File

@ -1,3 +1,3 @@
build:
docker:
web: sparafinski/invoice_ocr:latest
web: dockerfile