File size: 867 Bytes
a426d06 52bfd4c 5695a4d 4d0f961 5643bfb d8820e5 52bfd4c 2a71a10 52bfd4c a426d06 5db487c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
FROM python:3.9
# Set environment variable for Tesseract data directory
ENV TESSDATA_PREFIX=/usr/share/tesseract-ocr/4.00/tessdata/
# Install system dependencies
RUN apt-get update && apt-get install -y \
tesseract-ocr \
tesseract-ocr-eng \
tesseract-ocr-chi-sim \
tesseract-ocr-msa \
libleptonica-dev \
libtesseract-dev \
&& rm -rf /var/lib/apt/lists/*
# Install Tesseract and its language data files
# RUN apt-get update && apt-get install -y tesseract-ocr tesseract-ocr-chi-sim
# RUN apt-get update && apt-get install -y tesseract-ocr tesseract-ocr-msa
# Set environment variable for Tesseract executable path
ENV PATH="${PATH}:/usr/bin/"
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY . .
CMD ["gunicorn", "-b", "0.0.0.0:7860", "main:app"]
|