| # RelBench leaderboard submission API — Hugging Face Docker Space. | |
| # HF Spaces route traffic to $PORT (default 7860); uvicorn binds there. | |
| FROM python:3.11-slim | |
| ENV PYTHONUNBUFFERED=1 \ | |
| HF_HOME=/data/hf \ | |
| PORT=7860 | |
| # git is needed to pip-install relbench from GitHub. | |
| RUN apt-get update && apt-get install -y --no-install-recommends git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY app.py . | |
| # HF_HOME on /data persists the dataset cache across restarts IF the Space has persistent | |
| # storage; otherwise the ground-truth tables re-download on cold start (first submission slow). | |
| EXPOSE 7860 | |
| CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT:-7860}"] | |