Dockerfile 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # syntax=docker/dockerfile:1.7
  2. # Nemotron-3.5-Bolt-74B-A9B-24GB serving image (1x DGX Spark).
  3. #
  4. # The model card's Quick Start pins the STOCK vLLM nightly at commit
  5. # 77154ca6116ae34cbfe314beef1016bde9b63989 (2026-10-14) — the first build
  6. # that registers LiLiCorrDraftModel (the DFlash LiLiCorr speculator) and the
  7. # ultra_v3 reasoning parser. eugr/spark-vllm-b12x is a DIFFERENT vLLM fork
  8. # (commit 8244d1c44) that does NOT carry those, so it cannot serve Bolt with
  9. # the card's flags. This wrapper reproduces the card exactly: the card's
  10. # nightly base + `pip install b12x` + `vllm download-kernels`, baked once so
  11. # every serve is reproducible and needs no runtime pip/network.
  12. #
  13. # Pinned by arm64 digest (nightly tags expire); see versions.env.
  14. ARG BASE_IMAGE
  15. FROM ${BASE_IMAGE}
  16. ARG B12X_VERSION
  17. # The card's runtime setup, baked: b12x wheel + pre-downloaded vLLM kernels.
  18. # B12X_CACHE_DIR keeps the JIT-compiled native + autotuned kernels per node
  19. # (the recipe bind-mounts a host dir there, like the other JIT caches).
  20. ENV B12X_CACHE_DIR=/root/.cache/b12x
  21. # The card's ultra_v3 reasoning-parser plugin (shipped in the model repo).
  22. # Baked so the serve needs no network; referenced by absolute path from the
  23. # recipe (--reasoning-parser-plugin /opt/ultra_v3_reasoning_parser.py).
  24. RUN set -eux; \
  25. curl -fsSL -o /opt/ultra_v3_reasoning_parser.py \
  26. "https://huggingface.co/nvidia/NVIDIA-Nemotron-3.5-Bolt-74B-A9B-24GB/resolve/main/ultra_v3_reasoning_parser.py"; \
  27. test -s /opt/ultra_v3_reasoning_parser.py
  28. RUN set -eux; \
  29. pip install --no-cache-dir "b12x==${B12X_VERSION}"; \
  30. python3 -c "import b12x; print('b12x import OK')"; \
  31. vllm download-kernels || echo "vllm download-kernels: nothing to fetch / already present"
  32. # NOTE: we do NOT pre-build the b12x native here. It links -lcuda (the CUDA
  33. # *driver* lib), which the nvidia container runtime only mounts at RUNTIME
  34. # (--gpus all) — it is absent in the build image, so a build-time `load()`
  35. # fails with `ld: cannot find -lcuda`. b12x JIT-builds the native on the first
  36. # serve instead (libcuda present then); B12X_CACHE_DIR persists it per node.