FROM python:3.11-slim # HF Spaces run as a non-root user; give huggingface_hub a writable cache. ENV HF_HOME=/tmp/huggingface \ HF_HUB_DISABLE_TELEMETRY=1 \ PYTHONUNBUFFERED=1 WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY app.py . COPY static ./static RUN mkdir -p /tmp/huggingface && chmod -R 777 /tmp/huggingface EXPOSE 7860 CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]