# use small official image FROM python:3.11-slim # set workdir WORKDIR /app # copy only requirements first (for cache) COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # copy code COPY . . # uvicorn listen on 0.0.0.0:7860 (Spaces default port) CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--proxy-headers"]