FROM python:3.11-slim # Hugging Face requirement: user banao RUN useradd -m -u 1000 user USER user # Environment variables ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH \ PORT=7860 WORKDIR $HOME/app # Requirements install COPY --chown=user:user requirements.txt . RUN pip install --no-cache-dir --upgrade -r requirements.txt # Poora code copy COPY --chown=user:user . . # Command to run FastAPI on mandatory port 7860 CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]