Repository navigation
refactor(sdk): share managed model container resources - #13106
Merged
Merged
Conversation
Move the OpenClaw and Hermes context advisory out of Deployment::run into deployment::context_advisory, which returns the warnings for a validated document. Unit tests call it directly; one test still checks that plan and apply report the same warnings before creating state or starting a mutation.
Add ServiceDefinition::context_tokens, update_policy, and model_address so the context advisory and Docker model preservation no longer match on vLLM and Ollama themselves. model_address uses each installer's own address helper, so preservation can no longer drift from the compiled resource address.
The vLLM and Ollama installers each turned an optional ServiceContainer into shared memory, IPC, CPU, and memory settings with the same four expressions. ServiceContainer::resources now does it once, using default_shm for the omitted shared-memory size. Docker container labels use one push_label helper.
…nto refactor/sdk-context-advisory
…cessors # Conflicts: # crates/nemoclaw-sdk/src/deployment/context_advisory.rs
cv
enabled auto-merge (squash)
October 13, 2026 19:03
Contributor
|
v1 documentation preview: https://nvidia-preview-nemoclaw-v1-pr-13106.docs.buildwithfern.com/nemoclaw |
This was referenced Oct 13, 2026
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.
Moves the mapping from
containersettings to Docker resources intoServiceContainer, so the vLLM and Ollama installers share it.Why
#13058 added CPU and memory limits. The vLLM and Ollama installers each turn an optional
ServiceContainerinto fourProcessfields using the same chained.container.as_ref()…expressions:8GiB default that repeatsdefault_shm;DEFAULT_MEMORY_LIMIT_GIB.docker_computealso repeatedattrs["labels"].as_array_mut().unwrap().push(json!({…}))for the two limit labels.Change
ServiceContainer::resources(Option<&Self>) -> ContainerResourcescomputes the four values once. Both installers copy them intoProcess.default_shm. The value is still 8 GiB.push_labelindocker_computeadds the CPU and memory limit labels.Validation
cargo test -p nemoclaw-sdk --lib: 210 passed.cargo test -p nemoclaw-sdk --test integration: 444 passed. This includes the runtime compile tests that check the Docker limits and labels.cargo cion linux_arm64: all steps passed.