Repository navigation
feat(inference): add managed llama.cpp and native NIM services - #14611
Merged
Merged
Conversation
…-nim # Conflicts: # docs/agents-inference/inference.md # docs/get-started/migration.md # docs/resources/limits.md
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Collaborator
Author
Authoring session — opening
|
Contributor
Open
1 task done
Require the maintained manual NIM case to receive FOUR from the recorded agent runtime. Reuse the verifier's answer assertion so nonempty unrelated text no longer passes as a correct arithmetic reply. Record the scoped OpenShell 0.1.9 L40S qualification in the model guides, remove stale pending claims, and reference Fabric #679. Keep the utility model schema gap separate from default-8K context and tool-quality failures. Beyond CI: exact-source 7250d58 L40S evidence covers native NIM 2.0.12 BF16/llama3_json at 32K and pinned Muse llama.cpp, with auth, export/reapply, network isolation, bounded restart and retained-storage teardown. Both maintained transport lifecycles passed; NIM's agent answer was unrelated. The stricter NIM answer gate has not passed live qualification. No runtime, image, model, upstream pin or deployment configuration changes here. Validation: pinned OpenTofu 1.13.9 replay through the unchanged verifier accepted the saved unrelated reply under the old configuration, rejected it with answer=FOUR, and accepted FOUR with that assertion. This is verifier validation, not a live model run. HCL formatting and staged whitespace pass. Documentation validation: cargo run --locked -p nemoclaw-build -- fern check passed (0 errors; 2 warnings in each version check), using the already-installed macOS 15.4 SDK and task-local pinned protoc 36.2.
cv
reviewed
Nov 19, 2026
cv
added a commit
that referenced
this pull request
Nov 19, 2026
CI / Images and release staging build a llama.cpp runtime image, `llama-cpp`, for `linux/arm64` and `linux/amd64`: llama.cpp's CUDA 13.5 server image with NemoClaw's supervisor added, as the vLLM and Ollama images add it. No service runs it yet; [#14611](#14611) adds the runtime behavior on top of it. ## Problem v1 builds and releases runtime images only for vLLM and Ollama, so managed llama.cpp has no image to run. That image needs CUDA kernels for GB300 (`sm_103`) and GB10 (`sm_121a`) on both architectures, and llama.cpp's non-native CUDA builds gained `sm_103` only with [`fe14cad5`](ggml-org/llama.cpp@fe14cad) ("CUDA: add SM103 SASS to non-native builds"). Part of #14556; [#14611](#14611) adds the service. ## Change - `image/llama-cpp/Dockerfile` starts from `ghcr.io/ggml-org/llama.cpp:server-cuda13-b12375`, pinned by its multi-platform digest `sha256:c1c63d621e3a87c31680d538a0009ac83d165ef04d13bad84683dbb20c114fbe`. `fe14cad5` first shipped in release [b12367](https://github.com/ggml-org/llama.cpp/releases/tag/b12367), but llama.cpp publishes images from daily builds, and [b12375](https://github.com/ggml-org/llama.cpp/releases/tag/b12375) (source `9d25e0014c4b4b316873c01f4938c0e3c687287d`, which contains `fe14cad5`) is the first `server-cuda13` image after it. On both architectures its CUDA backend carries machine code for `sm_86`, `sm_89`, `sm_103`, `sm_120a`, and `sm_121a`, and PTX for `sm_75`, `sm_80`, and `sm_90`. - The image adds the supervisor and retained sources exactly as the Ollama image does. llama.cpp's image keeps no llama.cpp license, so `versions.json` pins llama.cpp's MIT license and the license files of the vendored libraries its server compiles in, and the image keeps them in `/opt/nemoclaw/source/`; [the notice](https://github.com/NVIDIA/NemoClaw/blob/v1/image/llama-cpp/NOTICE.md) records the source, the kernels, and the CUDA and Ubuntu notices the base keeps. - Bake's `runtimes` group gains the `llama-cpp` target, so release staging builds, scans, joins, and lists it with the vLLM and Ollama images, and the release catalog reserves its name. - CI / Images gains a `llama.cpp runtime / PLATFORM` job beside the `Build` jobs. It builds the image and runs `llama-server --version` and the supervisor's `--version` in it. It isn't a required check. - The supervisor gains `--version`, which prints its package version without reading a specification. - The build guide, notices, release notes, release, testing, and image license docs list the image; CUDA 13.5, like vLLM's CUDA 13.0, needs NVIDIA driver 580 or newer. The base pin lives in the Dockerfile's `FROM`, as the vLLM and Ollama pins do; Bake can't read `versions.json`. Left for #14611: the image's `org.nemoclaw.*` labels, the service kind, its schema, and the llama.cpp runtime. Like the vLLM and Ollama images, the image isn't rebuilt when only the supervisor changes. ## Beyond CI On a DGX Spark (GB10, driver 580.178.04, Linux ARM64), the image built with `docker buildx bake llama-cpp`. In it, `llama-server --version` reported build 12375, commit `9d25e0014`, the supervisor's `--version` printed `nemoclaw-runtime 0.1.0`, and `llama-server --list-devices` with the GPU listed `CUDA0: NVIDIA GB10`. `cuobjdump --list-elf` and `--list-ptx` on both platforms' `libggml-cuda.so` showed the architectures above. Inference on a GPU and the release staging job, which runs only for a tag, are unverified. Signed-off-by: Carlos Villela <[email protected]>
…-nim Signed-off-by: Carlos Villela <[email protected]> # Conflicts: # docker-bake.hcl # image/llama-cpp/Dockerfile # image/llama-cpp/NOTICE.md
…o prekshi/14556-llama-cpp-nim
Reuse snapshot verification records and transport for GGUF acquisition. Share writer locks, supervision, single-GPU admission and installer composition while retaining backend-specific credentials and placement. Keep inference authentication, move refusal probes out of startup readiness, and scope streaming redaction to NIM. Use a 2.50 GB GGUF in the live case and move duplicate assertions to the provider integration layer. Refresh schemas and the persisted format fingerprint.
This was referenced Nov 19, 2026
cv
added a commit
that referenced
this pull request
Nov 19, 2026
Moves the managed inference container, storage, and credential lifecycle out of the vLLM installer into a shared `installers/inference.rs` module, so later managed inference installers can reuse it. vLLM documents compile to the same OpenTofu resources, dependencies, and errors. ## Problem The vLLM installer owns the placement, process, storage, authentication, and removal steps that every managed inference runtime needs. #14611 adds llama.cpp and NIM installers that would each repeat those steps. Part of #14556. Extracted from #14611 so that PR can rebase onto it. ## Change - `installers/inference.rs` (crate-private): `address`, `Runtime`, `specification`, `install`, `remove`, and `credential_source`, moved from the vLLM installer. - `installers/vllm/mod.rs` calls the shared functions instead of its own copies. - Leaves out the llama.cpp and NIM installers, registry arms, schemas, and documentation from #14611. Co-authored-by: Prekshi Vyas <[email protected]>
cv
added a commit
that referenced
this pull request
Nov 19, 2026
Moves vLLM's backend supervision, output capture, writer lock, and credential loading into the runtime's shared `execution` module, so later managed runtimes reuse them instead of copying vLLM's. Runtime behavior, error messages, and forwarded backend output don't change. ## Problem The vLLM runtime owns its writer lock, memory sampler and readiness task, route-filter supervision, output capture, and credential loading, and Ollama repeats the writer lock. A new managed runtime, such as the llama.cpp and NIM runtimes in #14611, would copy them again. Part of #14556. Extracted from #14611, which can rebase onto this change. ## Change - `execution::lock` opens a lock file and takes its exclusive writer lock with the caller's error messages; vLLM's storage and credential locks and Ollama's storage lock use it. - `execution::serve` runs the memory sampler and readiness task, supervises the backend with or without a route filter, and explains its exit from its output. - `execution::supervisor::with_filter` is vLLM's route-filter supervision, moved from `vllm/runtime/routes.rs`. - `execution::output::Output` is vLLM's output capture, moved from `vllm/runtime/process.rs`; it still redacts the one bearer key. - `vllm/runtime/authentication.rs` moves unchanged to `execution/authentication.rs`. Ollama keeps its own sampler loop, because its readiness failures feed the sample stream. Streaming output filtering, which only NIM needs, stays in #14611. --------- Co-authored-by: Prekshi Vyas <[email protected]>
prekshivyas
marked this pull request as ready for review
November 19, 2026 17:03
5 tasks done
cv
enabled auto-merge (squash)
November 19, 2026 18:07
cv
added a commit
that referenced
this pull request
Nov 19, 2026
Set RECORD_FORMAT to 31, above v1's 30, with the recomputed fingerprint. Remove #14611's intent format 29 to 30 compatibility path, per the rule that v1 keeps no state compatibility code before 0.1.0: the compatible_previous check in Store::load, its format 29 tests, and the upgrade guidance in docs/build-deploy/state.md and docs/references/compatibility.md. A record in any other format, including 29 and 30, is refused like any other version. The release note since rc11 now names record version 31. v1's new llama.cpp and NIM Docker cases use the target shape: spec.gateway.target.docker with port 17695, as the vLLM case does.
cv
pushed a commit
that referenced
this pull request
Nov 20, 2026
) Each gateway selects its backend with one tagged `target`, which holds only what NemoClaw uses to install or reach the gateway there: `docker` or `podman` (an engine socket, an integer `port`, `networkCIDR` and `imagePullPolicy`), or `kubernetes` or `openshift` (the cluster target, authentication and `expose`). `runtime.provider` and the flat `endpoint`, `engine`, `networkCIDR`, `imagePullPolicy` and `kubernetes` fields are gone, a managed Kubernetes or OpenShift gateway without `expose` names no endpoint or port, and the intent record moves to version 31, so existing deployments need to be created again. ## Problem Before this change, `gateway.runtime.provider`, the presence of `gateway.kubernetes` and the flat engine fields had to agree, through conditionals on the managed gateway and four root rules. Editors offered Docker's socket and a local HTTP endpoint on a Kubernetes gateway, a Kubernetes document had to author a loopback port that nothing bound, and plan bound that port as identity. `runtime.provider: openshift` was a flag on the Kubernetes shape that also decided whether `expose.route` applied. Resolves #13829; #14588 tracks the chart settings a document still can't reach. ## Change Following [cv's decisions](#13829 (comment)): - **Document shape:** `gateway.target` is a `oneOf` of single-key objects, one Rust enum per management mode (`ManagedTarget`, `ExternalTarget`); omitting it still selects Docker with its defaults. Docker and Podman share one Rust struct and Kubernetes and OpenShift another, and the schema gives each target its own definition: Docker's `engine` defaults to Docker's socket and its `imagePullPolicy` takes `IfNotPresent` or `Never`; Podman requires `engine` and also takes `Always`; only `openshift`'s `expose` takes `route`. A violation reports its target's rule, and the root rules on `imagePullPolicy` and `kubernetes` are gone; the sandbox image, managed service and sandbox-cap rules key on a `kubernetes` or `openshift` target. - **Ports and endpoints:** Docker and Podman take an integer `port` from 1024 through 65535, default 17681, instead of `endpoint`. A published cluster gateway's endpoint moves to `expose.endpoint`. Without `expose`, a cluster gateway has no endpoint: the Kubernetes resources no longer take `endpoint`, each command forwards a free local port, plan and apply print `OpenShell gateway: not published; …`, and JSON results leave out `connection.gatewayEndpoint`. The `openshell_gateway` data source takes `endpoint` only when `kubernetes` isn't set. OpenShell objects and Fabric agents on such a gateway carry an empty endpoint, which apply and refresh now accept: a carried field holds the configuration as written and is never observed, so an empty one is no longer an incomplete observation. - **Pull Secrets:** `imagePullSecrets` is removed. Sandbox pods' pull Secrets go in OpenShell's `openshell.drivers.kubernetes.image_pull_secrets`, which NemoClaw no longer rejects in `config`. The gateway and certgen pods get none; they pull OpenShell's public images, and the limits page records the case of an authenticated mirror. - **OpenShift:** `target.openshift` replaces `runtime.provider: openshift` and still passes the chart the two values that unset the gateway's UID and fsGroup, until ai-openshell/openshell#5483; then only those values go. - **Plan:** plan and apply refuse a changed target on an existing deployment before they read or change anything, as they refuse a changed endpoint or exposure. - **State:** the intent record moves to version 31, and the format 29 to 30 upgrade from #14611 is removed, because v1 keeps no state compatibility code before 0.1.0: a release refuses state in any other format. - **Onboarding:** the journey asks `/spec/gateway/target` instead of the runtime, and the engine question and the suggested agent images follow the chosen target's engine. - **Messages:** errors that named `spec.gateway.runtime.provider`, `spec.gateway.endpoint`, `spec.gateway.engine` or `spec.gateway.networkCIDR` name the target's fields. - **Examples, docs and tests:** every example, case and fixture uses the new shape, the docs and the generated reference describe it, and the usage guide lists the edits that author a document for another target. A test applies only those edits to every example for each of the eight targets and parses the result; the unexposed kind case gains an unchanged plan. Left out: a chart-values passthrough (cv's decision 2), and moving a live deployment to another target, which needs a new deployment. V0's `config export` still writes `runtime` and `endpoint`; the V0 migration skill replaces them with the `docker` target. ## Beyond CI - **OpenShift Local:** `openshift-oidc` passed by hand at 575a9e4, twice, on one OpenShift Local 4.22.14 node (CRC 2.64.0, linux/amd64) with Agent Sandbox 1.0.3, using this branch's bundle and an OpenClaw image built from it: apply, a reply from each agent through the Route, an unchanged plan, and a destroy that kept only the gateway's storage, in 161 s and 76 s. - The `openshift` target gave the chart null `runAsUser` and `fsGroup`. OpenShift wrote the namespace's range, `1000720000/10000`, and admitted the gateway, both sandboxes and their supervisors under `restricted-v2`, each running as UID 1000720000 with `fsGroup` 1000720000. - The chart's pass-through Route served `https://<namespace>.apps-crc.testing:443`. The sandboxes pulled the agent image from the cluster's registry with the Secret that `openshell.drivers.kubernetes.image_pull_secrets` names, and the gateway pod got no such Secret. - Only this one amd64 node has run it, and no CI job runs `openshift-oidc`. Signed-off-by: Hai Nguyen <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Carlos Villela <[email protected]>
cv
added a commit
that referenced
this pull request
Nov 20, 2026
#14716) The v1 release notes record what reached `v0.1.0-rc12` as that release candidate's own changes and breaking changes, record what reached `v1` after its tag, and add the managed llama.cpp service to the support matrix. The release guide lists the `llama-cpp` package that staging requires. ## Problem `docs/about/release-notes.md` listed everything after `v0.1.0-rc11` as unreleased, although `v0.1.0-rc12` is tagged at 1636069. Three user-visible changes in it had no note: #14567, #14611, and #14594. The onboarding line from #14598 and #14652 sat under rc11, although both merged after its tag. The support matrix didn't list managed llama.cpp or its GPU case. Staging `v0.1.0-rc12` first failed because `ghcr.io/nvidia/nemoclaw/v1/llama-cpp` didn't exist: #14636 added the image to staging, but `internal-docs/contributing/releases.md` doesn't list its package among those a maintainer creates. ## Change - Relabel "Changes Since v0.1.0-rc11" and "Breaking Changes Since v0.1.0-rc11" as "Changes in v0.1.0-rc12" and "Breaking Changes in v0.1.0-rc12", between the `v0.1.0-rc11` and `v0.1.0-rc12` tags, and point the two links to them. - Add "Changes Since v0.1.0-rc12" with what merged after the tag: the Fabric `v0.7.0` pin (#14714), and apply pulling and reading every agent image before it creates the gateway, with plan and the onboarding review reporting an absent image (#14701). #14706, #14709, and #14717 change only documentation. Add an empty "Breaking Changes Since v0.1.0-rc12". - Add notes to rc12's changes: - #14567: `spec.sandboxes.<name>.gpus` requests GPUs for an agent's tools. - #14611: a `kind: llamaCpp` service serves one pinned GGUF on one CUDA GPU; `kind: nim` remains a candidate, with #14556's qualification record. - #14594: images keep the license notices their components require. - Move the line on choosing the one local image that installs the harness (#14598, #14652) from rc11's section to rc12's. - Support matrix: llama.cpp and the native NIM candidate in the `docker` row; Model Services rows for managed llama.cpp, which the `docker-openclaw-llama-cpp` case runs on the GPU runner, and for native NIM, qualified by hand; the GPUs text covers llama.cpp and NIM hardware checks and sandbox `gpus`. - `internal-docs/contributing/releases.md`: list `llama-cpp` with the packages a maintainer creates before staging. Release candidates have no users, so the notes add no migration steps.
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.
Add managed llama.cpp and native NVIDIA NIM services to v1 so deployments can own model startup, readiness, inference routing and retained storage alongside their agents.
Problem
V0 users of llama.cpp or NIM need a managed inference lifecycle in v1. Generic containers do not provide pinned model acquisition, capacity admission, retained inference credentials or protected NGC credential delivery.
Part of #14556. Technical ownership and release timing remain maintainer decisions; this draft does not close the issue.
Change
The initial scope is one model on one CUDA GPU. Distributed inference is outside V0 parity. Other models/profiles, cross-host restoration and general agent/tool reliability need separate qualification.
Beyond CI
Source-specific Spark/L40S lifecycle, authenticated inference, unchanged reconciliation, teardown and bounded NIM agent results are recorded in #14556's qualification report, together with tested configurations, failures and remaining limits. General agent reliability, default-8K NIM and cross-host restoration remain unqualified.