python is a disaster

This commit is contained in:
2026-04-23 13:28:30 +00:00
parent 1f12853509
commit 8310d82f6e

View File

@@ -43,8 +43,12 @@ ARG HF_TOKEN=
# --- Upgrade xgrammar to bleeding edge for tool-call constrained decoding ---
# Kimi K2 drops optional tool-call params with older xgrammar; upgrading fixes
# the grammar matcher so it doesn't prematurely terminate optional fields.
# Using git main for nightly; pin to a release (e.g. xgrammar==0.1.33) if preferred.
RUN pip install --no-cache-dir --force-reinstall \
#
# IMPORTANT: --no-deps prevents pip from nuking the ROCm torch build and
# other vLLM-pinned dependencies. xgrammar's only runtime deps that matter
# (torch, numpy, etc.) are already in the image. Build from git main for
# nightly; pin to a release (e.g. xgrammar==0.1.33) if preferred.
RUN pip install --no-cache-dir --force-reinstall --no-deps \
'xgrammar @ git+https://github.com/mlc-ai/xgrammar.git@main'
ENTRYPOINT ["python3", "-m", "vllm.entrypoints.openai.api_server"]