FROM python:3.11-slim # HF Spaces requirement: run as user 1000 RUN useradd -m -u 1000 user WORKDIR /home/user/app # Install only the app dependencies (not the full pipeline) COPY requirements-app.txt . RUN pip install --no-cache-dir -r requirements-app.txt # Copy application code COPY app.py . COPY static/ static/ COPY data/aggregated/ data/aggregated/ # HF Spaces requires port 7860 EXPOSE 7860 USER user CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]