From a0d017a4601a3ba6c25f62ab45febec6566f88ec Mon Sep 17 00:00:00 2001 From: amazingvince Date: Sat, 3 Sep 2022 00:48:23 -0400 Subject: [PATCH 1/3] adding first pass at Dockerfile --- Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7daee51 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM ubuntu:latest + +RUN apt-get update \ + && apt-get install -y python3-pip python3-dev \ + && apt-get install -y tesseract-ocr \ + && apt-get install -y poppler-utils \ + && apt-get install -y git \ + && cd /usr/local/bin \ + && ln -s /usr/bin/python3 python \ + && pip3 --no-cache-dir install --upgrade pip \ + && rm -rf /var/lib/apt/lists/* + +WORKDIR /project +COPY ["README.md", "pyproject.toml", "setup.py", "./"] +COPY ["src/", "./src"] + +RUN pip install .[donut] +CMD ["python3"] \ No newline at end of file From a7ca26e874c4677ce334023fe93870ac87c51d10 Mon Sep 17 00:00:00 2001 From: Vincent Date: Sat, 10 Sep 2022 20:22:36 -0400 Subject: [PATCH 2/3] going to 3.10, adding tesseract 5 and using slim container --- Dockerfile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7daee51..078a8fa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,10 @@ -FROM ubuntu:latest +FROM python:3.10-slim-bullseye RUN apt-get update \ - && apt-get install -y python3-pip python3-dev \ + && apt-get install -y software-properties-common \ + && add-apt-repository -y ppa:alex-p/tesseract-ocr5 \ && apt-get install -y tesseract-ocr \ && apt-get install -y poppler-utils \ - && apt-get install -y git \ - && cd /usr/local/bin \ - && ln -s /usr/bin/python3 python \ && pip3 --no-cache-dir install --upgrade pip \ && rm -rf /var/lib/apt/lists/* @@ -14,5 +12,5 @@ WORKDIR /project COPY ["README.md", "pyproject.toml", "setup.py", "./"] COPY ["src/", "./src"] -RUN pip install .[donut] +RUN pip install . CMD ["python3"] \ No newline at end of file From 2759502ea8352126c1d8ce17124391e6652f3fcc Mon Sep 17 00:00:00 2001 From: Vincent Date: Sat, 10 Sep 2022 20:26:35 -0400 Subject: [PATCH 3/3] empty endline for pre-commit --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 078a8fa..e84b4d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,4 +13,4 @@ COPY ["README.md", "pyproject.toml", "setup.py", "./"] COPY ["src/", "./src"] RUN pip install . -CMD ["python3"] \ No newline at end of file +CMD ["python3"]