Spaces:
Running
Running
| FROM vllm/vllm-openai:latest | |
| # βββ System deps ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| RUN apt-get update && apt-get install -y --no-install-recommends git && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # βββ Ensure `python` exists (base image only has `python3`) ββββββββββββββββββ | |
| RUN ln -sf /usr/bin/python3 /usr/bin/python | |
| # βββ Remove deep_ep (MoE expert parallelism, requires NVSHMEM not available) β | |
| RUN pip uninstall -y deep_ep || true | |
| # βββ Install olmes from GitHub (not on PyPI) βββββββββββββββββββββββββββββββββ | |
| RUN git clone --depth 1 https://github.com/allenai/olmes.git /tmp/olmes && \ | |
| pip install --no-cache-dir "/tmp/olmes[gpu]" && \ | |
| rm -rf /tmp/olmes | |
| # βββ Python deps for entrypoint ββββββββββββββββββββββββββββββββββββββββββββββ | |
| RUN pip install --no-cache-dir pyyaml huggingface-hub requests | |
| # βββ Apply compatibility patches (must run AFTER all pip installs) βββββββββββ | |
| COPY patches.sh /app/patches.sh | |
| RUN chmod +x /app/patches.sh && /app/patches.sh | |
| # βββ Copy entrypoint + eval config βββββββββββββββββββββββββββββββββββββββββββ | |
| COPY entrypoint.py /app/entrypoint.py | |
| COPY eval.yaml /app/eval.yaml | |
| WORKDIR /app | |
| # Reset base image's ENTRYPOINT (vllm server requires GPU, crashes on CPU Spaces). | |
| # Space mode: entrypoint detects no WEBHOOK_PAYLOAD β runs webhook receiver on 7860. | |
| # Job mode: WEBHOOK_PAYLOAD is set β runs eval pipeline and exits. | |
| EXPOSE 7860 | |
| ENTRYPOINT [] | |
| CMD ["python3", "/app/entrypoint.py"] | |