Alex Chan
Fix upload issue
b513264
Raw History Blame
670 Bytes
# ── Public frontend: thin Streamlit client ──
FROM python:3.13-slim
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
WORKDIR /app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY frontend/ ./frontend/
# HuggingFace Spaces routes traffic to port 7860
EXPOSE 7860
WORKDIR /app/frontend
# XSRF protection must be disabled so the file_uploader works behind the
# HuggingFace Spaces reverse proxy (otherwise uploads fail with HTTP 403).
CMD ["streamlit", "run", "app.py", \
"--server.port=7860", "--server.address=0.0.0.0", "--server.headless=true", \
"--server.enableXsrfProtection=false", "--server.enableCORS=false"]