Repository navigation
fix(docker): label every model container with its memory limit - #14505
Merged
Merged
Conversation
A model container created with the default 104 GiB limit had no memory-limit label, so only a later explicit limit forced replacement. Every container now carries the label, and the comment records why a memory change must restart the container. Signed-off-by: Carlos Villela <[email protected]>
Collaborator
Author
Authoring session — opening
|
Contributor
…ntent record 22 makes moot Signed-off-by: Carlos Villela <[email protected]>
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.
Every managed vLLM and Ollama container on Docker now carries the
nemoclaw.nvidia.com/memory-limit-giblabel, including one with the default 104 GiB limit, so any memory limit change replaces the container.Problem
The label, which forces replacement when the memory limit changes, was added only when the limit differed from 104 GiB, so containers created before memory limits were configurable stayed unchanged. That branch is compatibility code, and its reason for the label was incomplete: it named only the OOM kill, not that the servers size from the limit at start.
Change
docker_containeralways gets the label; the 104 GiB branch and theDEFAULT_MEMORY_LIMIT_GIBre-export that only it used are gone.memoryandmemory_swapin place, Docker applies a lower limit to the running server and the kernel OOM-kills it, and Ollama and NemoClaw's supervisor size from the limit only at start.memoryLimitGiB: 104still compile the same container.Preservecheck that refuses an in-place memory decrease stays.provider.mddescribes the label without the 104 GiB exception,inference.mddrops the sentence about earlier bundles, and the release notes drop the one-time replacement notes for this label and forcpuLimitMillis(fix(docker): set model container CPU limits through the provider's cpus #14491), since intent record 22 already makes everyv0.1.0-rc10deployment redeploy.Beyond CI
With OpenTofu 1.13.9, Docker provider 4.7.0, and Docker Engine 29.6.2 on linux/arm64, a container without the label and with
memory_swapequal tomemoryplanned["update"]for each memory change and kept running when the limit rose or stayed above its usage. Lowered below its usage, apply succeeded and the kernel OOM-killed the container (exit 137,OOMKilled). Ollama v0.40.16 readsmemory.maxandmemory.currentwhen it loads a model, and NemoClaw loads one model once; on GB10, CUDA allocations don't count toward the container's memory cgroup.