# Sync Pilot showcase — static SPA served behind an ACCESS_KEY gate (HF Docker Space). # The deploy script (scripts/deploy-showcase.sh) builds the Vite app locally and # copies dist/ + app.py here, so this image just serves the pre-built bundle. FROM python:3.12-slim WORKDIR /app RUN pip install --no-cache-dir flask==3.* gunicorn==23.* requests==2.* huggingface_hub==0.* COPY app.py . COPY dist ./dist EXPOSE 7860 ENV PORT=7860 PYTHONUNBUFFERED=1 # Single worker + threads: the usage map's in-memory store must live in ONE process # (2 workers each held half the data). Proxying is I/O-bound, so threads give the # concurrency back for simultaneous sync/tag requests. CMD ["gunicorn", "-b", "0.0.0.0:7860", "-w", "1", "--threads", "8", "app:app"]