Spaces:
Sleeping
Sleeping
File size: 1,935 Bytes
e2f615e 9cbb2a1 b5812b7 514462b 0b148dd e2f615e 514462b e2f615e f575e4e e2f615e 2c70552 e2f615e 2c70552 e2f615e f12cfa4 9a21135 d390195 f12cfa4 9a21135 | 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 34 35 36 | 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"]
|