FROM python:3.11-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . # HF Spaces expects the app on 7860. Cloud demo narrates via Claude (can't reach the local fleet); # the ANTHROPIC_API_KEY is injected as a Space secret at runtime. MPLCONFIGDIR -> writable /tmp so # matplotlib's font cache doesn't hit a read-only home on HF. ENV PORT=7860 \ INSIGHTS_LLM_BACKEND=claude \ ANTHROPIC_MODEL=claude-haiku-4-5 \ MPLCONFIGDIR=/tmp/matplotlib \ PYTHONUNBUFFERED=1 EXPOSE 7860 CMD ["python", "app.py"]