Skip to content

Commit

Permalink
Update prod dockerfile as well
Browse files Browse the repository at this point in the history
  • Loading branch information
jonchang committed Dec 6, 2024
1 parent e40bad7 commit 90e730c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions OCR/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
FROM python:3.10-bullseye
FROM python:3.10-slim

RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 tesseract-ocr-eng tesseract-ocr -y
RUN apt-get update && apt-get install libgl1 tesseract-ocr-eng tesseract-ocr -y

# Use larger "best" training data, rather than "fast"
# Python one-liner because we don't have curl or wget
RUN python3 -c 'from urllib.request import urlopen; print(urlopen("https://github.com/tesseract-ocr/tessdata_best/raw/refs/heads/main/eng.traineddata").read())' > /usr/share/tesseract-ocr/5/tessdata/eng.traineddata

RUN pip install poetry

COPY /ocr /ocr
COPY poetry.lock .
COPY pyproject.toml .

RUN poetry install --without dev
RUN poetry install --only main && poetry cache list | xargs -n1 poetry cache clear --all

ENTRYPOINT ["poetry", "run", "api"]

Expand Down

0 comments on commit 90e730c

Please sign in to comment.