Skip to content

feat(h1-nvidia): build custom vLLM images on the target host - #13

Merged
ric03uec merged 1 commit into
mainfrom
feat/vllm-image-build
Aug 22, 2026
Merged

feat(h1-nvidia): build custom vLLM images on the target host#13
ric03uec merged 1 commit into
mainfrom
feat/vllm-image-build

Conversation

@ric03uec

Copy link
Copy Markdown
Owner

Follow-up to #12 (merged). That PR shipped the qwen3.8-27b-fp8 model YAML but told users to build vllm-inx:26.06-py3-patched themselves from ric03uec/system/hosts/inx/vllm/. This PR closes that gap so make up HOST=h1-nvidia on a DGX Spark produces a runnable stack in one command.

What's in this PR

Dockerfile ships with the repo. hosts/h1-nvidia/vllm/images/vllm-inx.Dockerfile — verbatim port of system/hosts/inx/vllm/Dockerfile. Thin patch on nvcr.io/nvidia/vllm:26.06-py3 that pins prometheus-fastapi-instrumentator>=8.0.1 (works around fastapi >= 0.137 + prometheus-fastapi-instrumentator 8.0.0 returning 500 on every request; refs in the Dockerfile).

Ansible builds the image on the target. Three new tasks in 10-stack.yml between the layout and render blocks:

  1. Detect locally-tagged images referenced by the active set — an image: with no / before the : (so vllm-inx:26.06-py3-patched matches; vllm/vllm-openai:latest doesn't).
  2. docker image ls to see what's already present.
  3. community.docker.docker_image with source: build to build any missing tag from install_root/images/<name>.Dockerfile.

Build-context contract. Dockerfiles ship to the target under install_root/images/ alongside models and chat-templates. The build task runs on the target where the Docker daemon lives, using the copied context — the previous "run docker build against a control-host path" would have failed silently.

Naming rule. File vllm/images/<name>.Dockerfile produces tag <name>:<version> matched to a model YAML's image: <name>:<version>. No new schema field — the tag itself is the join key.

Template stays in sync. hosts/h3-template/ansible/10-stack.yml gets the same three tasks. AGENTS.md's "deliberate duplication" invariant means the template tracks the reference host; adding a capability to h1-nvidia without carrying it to h3-template is exactly the drift T7 is meant to catch.

T7.1 exclusion. tests/template_test.sh now excludes vllm/images/* alongside vllm/models/* — Dockerfiles are per-catalog-entry artifacts, not skeleton pieces every host must ship.

What's not in this PR

  • No BuildKit / buildx toggles. The bootstrap installs docker-ce and docker-compose-plugin; the modern Docker Engine defaults to buildx for docker build. If anyone hits a case where they need DOCKER_BUILDKIT=0, that's a follow-up.
  • No NGC auth automation. Users may need docker login nvcr.io on the target if their account gates the base image; documented in AGENTS.md, the model YAML notes, and the website. Wiring credentials from stack.env is scope creep.

Test plan

  • Workstation with only qwen2.5-coder-7b active → local_images is empty, build task skipped, make up unchanged.
  • DGX Spark with qwen3.8-27b-fp8 active → first make up builds vllm-inx:26.06-py3-patched from the shipped Dockerfile, second make up is a no-op (image already present, docker image ls filter skips the build).
  • docker image ls | grep vllm-inx on the target reports the built tag after the first run.
  • make test — 230/0. Existing render tests still cover the tracked 7B active set; the new build task has no unit test yet (would require mocking Docker), only integration coverage on a real Spark.

Ships the Dockerfile that produces vllm-inx:26.06-py3-patched — the
image qwen3.8-27b-fp8 needs — inside the lmstack repo, and teaches
10-stack.yml to build it on the target host when any active model
references a locally-tagged image and the tag is not already present.

Previously the PR pointed users at ric03uec/system/hosts/inx/vllm/
to build the image themselves. That leaks a dependency on a private-
looking sibling repo and breaks the "one command brings up the
stack" contract. Now `make up HOST=h1-nvidia` on a DGX Spark with
qwen3.8-27b-fp8 active builds the image (thin patch on
nvcr.io/nvidia/vllm:26.06-py3 that pins
prometheus-fastapi-instrumentator>=8.0.1), then starts the stack.

Build-context contract:
- Dockerfiles live at hosts/<host>/vllm/images/<name>.Dockerfile
  and produce the tag <name>:<version> where the model YAML's
  image: is <name>:<version>. Matching-by-tag is a naming rule,
  not a schema field.
- The layout task copies the images/ dir onto the target so
  docker_image has a build context where the daemon lives.
- The build task detects locally-tagged images by "no '/' before
  the ':'" and skips any tag already present (`docker image ls`).

Also:
- Sync hosts/h3-template/ansible/10-stack.yml with the h1-nvidia
  changes so a fresh copy of the template still has the same
  capabilities. Per-host duplication is deliberate (see AGENTS.md);
  drift is what T7.2 exists to catch, and the template stays the
  reference shape.
- Exclude images/ from T7.1 alongside models/: image Dockerfiles
  are per-catalog-entry artifacts, not skeleton pieces a new host
  must carry.

NGC base image note: users may need `docker login nvcr.io` on the
target if their account gates nvcr.io/nvidia/vllm:26.06-py3.
Documented in AGENTS.md, the model YAML notes, and the website.
@ric03uec
ric03uec merged commit 6b5e4f6 into main Aug 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant