FROM python:3.13-slim # Create user to avoid running as root RUN useradd -m -u 1000 user # Install dependencies COPY --chown=user requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY --chown=user . . # Run the application CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]