From a07a3daf85cb27538dc1983cd0c9e2d49740b3c5 Mon Sep 17 00:00:00 2001 From: TolaMironcenko Date: Wed, 8 Feb 2023 10:04:00 +0700 Subject: [PATCH] docker --- .dockerignore | 4 ++++ Dockerfile | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c31a48e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +.dockerignore +Dockerfile +.gitignore +.idea \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..62943f0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM python:3.11-alpine + +WORKDIR /app + +RUN pip3 install --upgrade pip + +COPY requirements.txt /app + +RUN apk add --no-cache tesseract-ocr python3 py3-numpy && \ + pip3 install --upgrade pip setuptools wheel && \ + apk add --no-cache --virtual .build-deps gcc g++ zlib-dev make python3-dev py3-numpy-dev jpeg-dev && \ + pip3 install matplotlib && \ + apk del .build-deps + +RUN pip3 install -r requirements.txt --no-cache-dir + +COPY . /app + +ENTRYPOINT ["python3"] + +CMD ["main.py"] \ No newline at end of file