Repository navigation
feat(inference): request several GPUs through Docker device requests - #14401
Merged
Merged
Conversation
One container.gpuDevices entry keeps gpus = "device=ID". Two or more now compile to the Docker provider's device_requests block with the nvidia driver, the sorted IDs, and the gpu capability, instead of a compile-time refusal, and the native container request names the same driver and IDs. The one-entry limit stays, so only tests reach the list path. Part of #14384 Signed-off-by: Carlos Villela <[email protected]>
Signed-off-by: Carlos Villela <[email protected]>
Collaborator
Author
Authoring session — opening
|
The provider sends device_ids, a set, in its own order, and OpenTofu compares sets, so sorting changed nothing. Link the upstream gpus issue and test the device list in one scenario. Part of #14384 Signed-off-by: Carlos Villela <[email protected]>
cv
enabled auto-merge (squash)
November 11, 2026 08:55
Contributor
This was referenced Nov 11, 2026
cv
added a commit
that referenced
this pull request
Nov 11, 2026
Brings the contributor guides, three skills, and four workflow comments in line with what `v1` does now, for maintainers who run or change CI and the test suites. Only documentation and comments change. ## Problem An audit of `internal-docs/`, `.agents/skills/`, `AGENTS.md`, `WRITING.md`, and the comments in `.github/workflows/` and `.github/actions/` against the commits in `v0.1.0-rc9..origin/v1` and the current code found statements that no longer hold: - `testing.md` gave the old contract budgets for `fabric-provider::contract` (25/10/20 s) and `nemoclaw-provider::contract` (45/8/16 s); `.config/test-budgets.yaml` and `.config/nextest.toml` now set 32/16/32 s and 82/12/24 s. - `testing.md` still described an offline runtime-rebuild test in the `live-docker` profile, which went away with the runtime builder; every test in that profile now uses Docker and runs in the `docker-engine` group. It also said the `live-docker` report joins "four" nextest commands, while the same page counted five; since #14238 the count depends on the selected Docker HCL cases, which `--hcl-cases` names, and the page didn't mention that option's rules. - `testing.md` said `changes live-images` looks for a commit that pushed "all four images"; `LIVE_PULLED` in `crates/nemoclaw-build/src/ci.rs` has three (OpenClaw, Hermes, dummy) since #14250. - `testing.md` said Docker and Kind jobs restore the shared Rust cache. Since the live suites run from archives (`.github/actions/live-suite`), only `E2E build images` restores it; Live / HCL's `Build` job uses its own `hcl-deps-v1` prefix. - `testing.md` and `live-tests.md` said a manual dispatch needs the workflow on the default branch, as GitHub's documentation says, and so told readers to run the advisory check locally and Live / Brev only through a pushed branch. GitHub has accepted dispatches of `CI / Dependencies` on a feature branch, including the advisory step, and of `Live / Brev` on `v1`, although `main` is the default branch; the evidence comment links the runs. `brev.yml` made the same claim in a comment. - `testing.md` didn't mention CI / Dependencies' `Python scripts` check, the manual `E2E / Colossus runner connectivity` workflow (#14305, #14340), or the Buildx warm-up before the Linux unit tests (#14367). - `testing.md` told authors to report commands and results in the PR, and `documentation.md` asked for `docs:` commits that explain "the decision and validation"; #14214 changed the template to Problem, Change, and Beyond CI, and `AGENTS.md` now sends local check results to whoever asked for the change. - `live-tests.md` placed the three hosted HCL cases on Live / HCL; #14238 moved them to CI / Bundle's `E2E HCL CASE` jobs on Linux AMD64. - `integration-tests.md` said the GTC DC Kubernetes scenario plans against an existing gateway and that its HCL equivalent isn't planned. #14315 made the example install a managed Kubernetes gateway, added `gtc-dc-kubernetes-amd64-hcl`, which plans `examples/kubernetes/hosted-nvidia.tf`, let the runner take a single `.tf` file, and kept a managed Kubernetes gateway's endpoint when redirecting to the fixtures. - `integration-tests.md`'s `nemoclaw-provider` contract table missed `gpu_requests` (#14401), `readiness_refs`, and `references`. - Workflow comments: `e2e-platform.yml` referred to a "required E2E check" and said no required check depends on the live suites, though a failed suite fails `Test / PLATFORM`; `image-build.yml` said the live suites pull the proxy image; `hcl-e2e.yml` said the hosted cases run "on every run", though they run only when selected and not on forks' pull requests. - Skills: `add-fabric-harness` omitted the `read_write` key that `image/fabric/catalog.py` accepts in `adapters.json` (#14037); `write-tests`' `tofu test` reference omitted single-file HCL modules; `verify-yaml-deployment` said all committed examples use ports 17901–17909 and 172.30.180–188, which only the GTC DC examples do. ## Change - `internal-docs/contributing/testing.md`: the budgets, the `docker-engine` group, the `live-docker` commands and `--hcl-cases` rules, the image count, the opt-in `live-images` step, the `tools/ci` push path and `Python scripts` check of the dependency workflow, the dispatch command for the advisory step, the Colossus workflow, the Buildx warm-up, the cache-sharing paragraph, and the reporting rule above. - `internal-docs/contributing/live-tests.md`: the runner of the hosted cases, and how to run Live / Brev on `v1`. - `internal-docs/contributing/integration-tests.md`: the module sources, the Kubernetes endpoint exception, both GTC DC Kubernetes rows, and three contract-table rows. - `internal-docs/contributing/documentation.md`: the pull request title and description rule. - `.agents/skills/`: the three skill corrections above. - `.github/workflows/{e2e-platform,image-build,hcl-e2e,brev}.yml`: comments only. Checked and left unchanged: `configuration-schema.md` (paths, commands, generator behavior), `releases.md` (the 11 agent packages match `HARNESSES` in `docker-bake.hcl`; the prune keeps 10 commits), `image-assessment.md` (Syft 1.55.0, Grype 0.121.0, the 72-hour database limit, the 120-second timeout, and the acceptance test's name), `agent-image-maintenance.md`, `documentation-build.md`, the design records' pins and source paths (OpenShell revision `5d25211b`, Helm provider 3.3.0), the kind and interface scenario details in `live-tests.md` against their `.tftest.hcl` files, `AGENTS.md`, `WRITING.md`, the PR creation skill, and the historical evidence pages. Left out, because they are outside this audit's scope: - #14414: `.github/actions/setup-docs/action.yml` restores `cache-prefix: native-bundle-v3`, but the bundle job has written `native-bundle-v4` since #14355, so documentation builds restore no current cache. `testing.md` now says so and links the issue. - #14415: the comments in `.config/nextest.toml` and `.config/test-budgets.yaml`, and the `cargo ci` step help in `crates/nemoclaw-build/src/main.rs`, are stale in the same way as `testing.md` was. ## Beyond CI A local check of every relative link and heading anchor in `internal-docs/`, `.agents/`, `AGENTS.md`, `WRITING.md`, and `.github/*.md` found no broken target; `fern check` covers only the published pages.
cv
added a commit
that referenced
this pull request
Nov 11, 2026
Corrects the inference, model, recipe, SSH placement, and limits pages, the inference parts of the provider reference, and the generated configuration reference where they disagree with `v1`, for users who configure managed or external inference. ## Problem An audit of these pages against the commits since `v0.1.0-rc9` and the current code found statements that `v1` contradicts. For example, `inference.md` says a model change restarts the runtime inside the existing sandbox, but a changed agent configuration replaces the sandbox and deletes its files and conversations. Several limits link issues that are resolved or decided, and two describe gaps that CI's live cases now cover. ## Change Each change and what makes it necessary: - **Sandbox replacement** (`inference.md`, twice): a model, settings, or image change replaces the agent's sandbox. `compile.rs` sets `replace_triggered_by` on the agent configuration (#13375), and `usage.md`'s change path already says so. - **Default memory limit** (`inference.md`, `ServiceContainer.memoryLimitGiB` doc comment): NemoClaw sets the 104 GiB limit (`DEFAULT_MEMORY_LIMIT_GIB`); Docker has no such default. - **Fields Ollama rejects** (`inference.md`): `kind: ollama` has no `kvCacheGiB`, `batchTokens`, `recipe`, `serving.modelName`, or `authentication`, and its schema objects set `additionalProperties: false`, so a zero value is rejected too; the page said only nonzero values were. - **GPU selection** (`inference.md` managed Ollama prerequisites, `models.md` Nemotron example): a host with several GPUs works when `container.gpuDevices` selects one (#13929). - **Managed Ollama replies** (`inference.md`, `limits.md`): CI's `docker-openclaw-hermes-ollama` live case gets a Hermes reply through managed Ollama with `qwen3:0.6b` on the Linux AMD64 GPU runner, so "GPU inference and agent replies have not been tested" is replaced by what the case covers; tool use and other GPUs stay limits. The Hermes context section now says only what was observed: `Qwen/Qwen3-4B` can't meet Hermes's 64,000-token minimum, and Hermes replied with `qwen3:0.6b` at 32,768 tokens in that case; it no longer states an unverified mechanism. The limits row also covers harnesses other than Hermes. - **Linux AMD64 row removed** (`limits.md`): the hosted live cases reach agent replies on Linux AMD64 on every CI run. - **SSH engines** (`remote-service.md`, `limits.md`): retained-data removal on SSH engines is verified and the Docker procedure covers it (#12640, completed); the SSH capacity collector is a POSIX shell script, not Python (`hardware/ssh.rs`); SSH placement on GPU hardware has no live test (#12641). - **Decided issues** (`inference.md`, `limits.md`): a managed NIM service is not planned, and NIM works as an external endpoint (#12649); network-request approval and policy explanation belong to OpenShell's policy advisor, and `grants` replace presets (#12651), now two rows. The DGX Station rows, whose issues closed for replanning, point to #12641. - **Provider reference** (`provider.md`): `openshell_inference` takes a readiness `ref` as `server` (#13252), so the "until inference registrations take the ref" workaround is gone. Each deployment is one OpenTofu root (#13254, #13286), so the readiness and gateway sections describe one generated graph, in which OpenShell objects wait for every runtime resource and readiness read, instead of separate runtime and OpenShell graphs. Not checking external servers is by design (#13256). - **Plan-time configuration checks** (`agents.md`): #13319 is closed; #14148 tracks checking at plan time. - **Diagnostic limit** (`models.md`, `limits.md`): once a command's OpenTofu diagnostics exceed 16 KiB, the SDK replaces them with `child output exceeds the supported limit` (`process.rs`, #14399), which can hide vLLM's exit excerpt. - **Parser names** (`models.md`): NemoClaw checks only a parser name's form (`PARSER` in `vllm/constraints.rs`); vLLM rejects an unknown parser at startup, and the stop detail carries its error (#14397). - **Several GPUs** (`inference.md`, `models.md`): the statements about several selected GPUs apply once #14384 lifts `container.gpuDevices`'s one-entry limit, and the pages say so. - **Speculative tokens** (`recipes.md`): `serving.speculativeTokens` works only with a recipe and passes `--speculative-config` with the `mtp` method (`arguments.rs`, `vllm/schema.rs`); no guide described it. - **Configuration reference**: the container descriptions mention GPU selection, and the guide links for `ServiceContainer`, `ServiceUpdatePolicy`, the Ollama types, `ExternalOllama`, and `ServiceAuthentication` point to their sections instead of the general usage page. `Overrides.model` names each managed service's served model (`served_model` in `vllm/config.rs`, `services/registry.rs`); it named only vLLM's. The generator's dead `OllamaProxy` arm is removed. Regenerated with `nemoclaw-build schema`. Checked and left unchanged: the recent multi-GPU changes (#14388 to #14401), the vLLM bearer route filter, timeout budgets, profile catalog, memory reserves, hardware profiles, onboarding catalogs, Ollama and vLLM pins, image tags, interface pages, and the OAuth-refresh guide match `v1`. Left for follow-up, because no open issue tracks them: - Limits and `inference.md` sentences link issues closed for replanning with no successor: #12035 (llama.cpp, Model Router, Gemini), #12038 (hosted-provider guides), #12144, #12037, #12137, and #12042. - `agents.md` links #13313 for Hermes not sending API placeholders to MCP servers; #13313 tracked the `api` credential type. - The OpenClaw walkthrough row links #13372, which is fixed; whether the walkthrough was rehearsed afterward is unrecorded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A managed vLLM or Ollama service that lists two or more GPUs in
container.gpuDevicesnow compiles to one Docker device request for all of them, instead of a compile-time refusal.container.gpuDevicesstill takes one entry, so no configuration reaches this path until the limit is lifted.Problem
Part of #14384 (step 8, design decision 7). Steps 9 and later remain, including lifting the one-entry limit and the live run on a multi-GPU host.
The pinned Docker provider, kreuzwerker/docker v4.6.0, can't request several devices through
gpus: its create path splitsdevice=0,1on commas into DeviceIDs[0]and a count of 1, which Docker refuses, and a spelling that creates the right request reads back differently, so the ForceNewgpusattribute would replace the container on every plan. Upstream tracks this in kreuzwerker/terraform-provider-docker#1019, with a fix in kreuzwerker/terraform-provider-docker#1020. Until now the SDK refused to compile two or more devices.Change
gpus = "device=<id>".device_requests { driver = "nvidia", device_ids = [...], capabilities = ["gpu"] }. The block's driver defaults tocdi, so it namesnvidia;--gpusleaves the driver empty, and Docker picks the registered driver that offers thegpucapability.device_idsis a set, so Docker receives the IDs in the provider's order and OpenTofu compares them as a set.managed/spec.rsnames the same driver, IDs, and capability: an empty driver for one GPU, as--gpussends, andnvidiafor a list. Only gateway containers go through theDeviceRequestsdrift check, which compares IDs in order, and they request no GPU; a check of a service'sDeviceIDswould have to compare them as a set.gpu_requestscontract test runs the bundled provider against the SSH simulator in one scenario: adding a second GPU to a one-GPU container replaces it; an index and a UUID, then three indexes, reach Docker as one request with those IDs, drivernvidia, and thegpucapability; each second plan is empty; and changing the list replaces the container. The test that recordsgpus = "device=0,1"reaching Docker as one device and a count stays, since it's why the block exists.docs/references/provider.mdand the compile path link docker_container: gpus = "device=0,2" requests one GPU plus a count instead of GPUs 0 and 2 kreuzwerker/terraform-provider-docker#1019, so the block can go when a release fixesgpus.Left out: CDI (
driver = "cdi"), which would need CDI specs on every engine; and lifting the one-entry limit, which is step 9.If kreuzwerker releases kreuzwerker/terraform-provider-docker#1020 first, step 9 may move lists back to
gpusand delete this path.Beyond CI
A review probe outside CI used Docker 29.6.2 with CDI and kreuzwerker/docker v4.6.0 on one GB10 GPU. A
device_requests { driver = "nvidia", device_ids = ["0", "GPU-…"], capabilities = ["gpu"] }block, in HCL and in the.tf.jsonform the SDK writes, started a container that saw the GPU, and a second plan reported no differences.docker inspectshowed Drivernvidia, Count 0, both IDs in the provider's order, and Capabilities[["gpu"]].Not verified:
driver = "nvidia"starts the same container as--gpus.nvidia-container-runtime-hookinstead of CDI.