# Hugging Face Space (SDK Docker) : la chaîne TwinHypervisor rejouée à la demande. FROM python:3.11-slim RUN apt-get update && apt-get install -y --no-install-recommends git libgomp1 \ && rm -rf /var/lib/apt/lists/* # Dépôt figé à un commit : la démo calcule exactement ce que le jury peut recalculer. ARG TWINHYP_COMMIT=6ba9b8f6040afd51452b8254451881888aaa606f RUN git clone https://github.com/elafortune/twin_hypervisor /opt/twin_hypervisor \ && git -C /opt/twin_hypervisor checkout --quiet "$TWINHYP_COMMIT" \ && rm -rf /opt/twin_hypervisor/.git COPY requirements.txt /tmp/requirements.txt RUN pip install --no-cache-dir -r /tmp/requirements.txt \ && pip install --no-cache-dir --no-deps -e /opt/twin_hypervisor # Spaces exécute le conteneur avec l'UID 1000 RUN useradd -m -u 1000 user && chown -R user /opt/twin_hypervisor USER user ENV HOME=/home/user PYTHONUNBUFFERED=1 GRADIO_ANALYTICS_ENABLED=False TWINHYP_REPO=/opt/twin_hypervisor WORKDIR /home/user/app COPY --chown=user app.py . EXPOSE 7860 CMD ["python", "app.py"]