Skip to content

Commit

Permalink
build: only install tessdata
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw committed Nov 23, 2023
1 parent 6ebaa38 commit 1457434
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile.backend
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ WORKDIR /
COPY pyproject.toml .

RUN apt update
RUN apt install -y curl tesseract-ocr libtesseract-dev
RUN apt install -y curl tesseract-ocr-eng
RUN curl -sSL https://install.python-poetry.org | python -
RUN poetry install --without=dev

Expand All @@ -19,12 +19,12 @@ FROM python:3.11.6-slim
ENV HOME /home/user
ENV PYTHONUNBUFFERED 1
ENV PYTHONDONTWRITEBYTECODE 1
ENV TESSDATA_PREFIX /usr/share/tesseract-ocr/5/tessdata/
ENV TESSDATA_PREFIX /usr/share/tessdata

WORKDIR $HOME/app

COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
COPY --from=builder /usr/share/tesseract-ocr/5/tessdata/ $TESSDATA_PREFIX
COPY --from=builder /usr/share/tesseract-ocr/5/tessdata/eng.traineddata $TESSDATA_PREFIX/eng.traineddata
COPY . $HOME/app

CMD ["python", "main.py"]

0 comments on commit 1457434

Please sign in to comment.