FROM python:3.11-slim ENV PYTHONUNBUFFERED=1 \ PYTHONDONTWRITEBYTECODE=1 \ PIP_NO_CACHE_DIR=1 WORKDIR /app RUN apt-get update && \ apt-get install -y --no-install-recommends git && \ rm -rf /var/lib/apt/lists/* # Install deps first so the layer caches across code-only changes. COPY server/requirements.txt /app/server/requirements.txt RUN pip install -r /app/server/requirements.txt huggingface_hub>=0.20 # Install the graphtestbed package itself so server/api.py can # `from graphtestbed._manifest import ...`. COPY pyproject.toml /app/ COPY graphtestbed /app/graphtestbed COPY datasets /app/datasets COPY server /app/server RUN pip install --no-deps -e /app # HF Spaces mounts /data on Persistent Storage tier; on free tier it's # just an in-container path that the dataset-repo backup loop preserves. ENV GT_DATA_ROOT=/data \ GT_DIR=/data/gt \ GT_DB=/data/leaderboard.db \ GT_ARCHIVE_DIR=/data/submissions \ GT_DATASET_REPO=lanczos/graphtestbed-gt \ GT_BACKUP_INTERVAL=60 \ GT_QUOTA=5 \ PORT=7860 RUN mkdir -p /data && chmod 777 /data EXPOSE 7860 CMD ["python", "/app/server/space/space_entry.py"]