FROM python:3.10 RUN apt-get update && apt-get install -y libgl1-mesa-glx libxext6 RUN apt-get install -y pandoc RUN apt-get install -y tesseract-ocr RUN apt-get install -y tesseract-ocr-vie RUN apt-get install -y tesseract-ocr-script-viet RUN useradd -m -u 1000 user USER user ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH ENV X-FORWARDED-PROTO="https" WORKDIR $HOME/app COPY --chown=user ./requirements.txt $HOME/app/requirements.txt RUN pip install --no-cache-dir --upgrade -r $HOME/app/requirements.txt COPY --chown=user . $HOME/app RUN mkdir nltk_data CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]