File size: 1,378 Bytes
072ef88
 
 
 
37ffe53
 
 
 
 
 
 
 
072ef88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37ffe53
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# 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 both the
# imputation (Track 2) and forecasting (Track 3) 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 (current main
# HEAD) for reproducibility + reliable Docker-layer cache busting; bump this
# when the reducers change. main@991caf5 adds the unified forecasting per-user
# substrate reducers (PR #35).
RUN pip install --no-cache-dir --no-deps \
    "openmhc @ git+https://github.com/AshleyLab/myheartcounts-dataset@991caf54fc728b8f0b53873f3bc589ac3cb3c1bd"

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}"]