FROM python:3.10 | |
# 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/* | |
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"] | |