FROM python:3.12-slim RUN apt-get update && apt-get install -y --no-install-recommends fonts-wqy-zenhei && rm -rf /var/lib/apt/lists/* RUN useradd -m -u 1000 user WORKDIR /home/user/app COPY APIGateway/requirements.txt /tmp/requirements.txt RUN pip install --no-cache-dir -r /tmp/requirements.txt COPY --chown=user:user . . USER user ENV PYTHONUNBUFFERED=1 PYTHONUTF8=1 WORKOS_PDF_FONT=/usr/share/fonts/truetype/wqy/wqy-zenhei.ttc EXPOSE 7860 CMD ["uvicorn", "deploy.huggingface.app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]