# OpenMHC leaderboard — HF Docker Space (self-rendering website). # Computes the imputation leaderboard live from the OpenMHC-leaderboard-data # HF dataset and serves it as HTML on $PORT (HF Spaces default 7860). # Requires an HF_TOKEN secret with read access to the (private) dataset. FROM python:3.11-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # git is required for the VCS install below (absent from python:*-slim). RUN apt-get update && apt-get install -y --no-install-recommends git \ && rm -rf /var/lib/apt/lists/* # Canonical point-flow reducers (skill / rank / fair skill) for the imputation # (Track 2), forecasting (Track 3), and predictive (Track 1) leaderboards. Installed # WITHOUT deps so the heavy base deps (torch, xgboost, ...) are skipped — only the # slim runtime set in requirements.txt is used. Pinned to a commit for reproducibility # + reliable Docker-layer cache busting; bump this when the reducers change. @92925ac # adds the Track-1 live substrate reducer (reduce_substrate_to_point); it is on branch # fix/leaderboard-point-estimate — repin to main once merged. RUN pip install --no-cache-dir --no-deps \ "openmhc @ git+https://github.com/AshleyLab/myheartcounts-dataset@92925ac1220f0edda98a56cf0651a5d92219c43b" COPY app.py leaderboard_compute.py logo.png ./ ENV PORT=7860 EXPOSE 7860 CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${PORT}"]