Skip to content

fix(docker): label every model container with its memory limit - #14505

Merged
cv merged 2 commits into
v1from
cv/docker-memory-label
Nov 16, 2026
Merged

cv merged 2 commits into
v1from
cv/docker-memory-label

Conversation

@cv

@cv cv commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Every managed vLLM and Ollama container on Docker now carries the nemoclaw.nvidia.com/memory-limit-gib label, 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_container always gets the label; the 104 GiB branch and the DEFAULT_MEMORY_LIMIT_GIB re-export that only it used are gone.
  • The comment records why a memory change must restart the container: Docker provider 4.7.0 updates memory and memory_swap in 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.
  • Omitting the limit and declaring memoryLimitGiB: 104 still compile the same container.
  • The Preserve check that refuses an in-place memory decrease stays.
  • provider.md describes the label without the 104 GiB exception, inference.md drops the sentence about earlier bundles, and the release notes drop the one-time replacement notes for this label and for cpuLimitMillis (fix(docker): set model container CPU limits through the provider's cpus #14491), since intent record 22 already makes every v0.1.0-rc10 deployment 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_swap equal to memory planned ["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 reads memory.max and memory.current when it loads a model, and NemoClaw loads one model once; on GB10, CUDA allocations don't count toward the container's memory cgroup.

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]>
@cv

cv commented Nov 16, 2026

Copy link
Copy Markdown
Collaborator Author
Authoring session — opening
Field Status Value Evidence or limit
Harness partial Pi coding agent 1.5.2 with the Pit TypeScript tool Version from the running harness's install path; the session header records only its schema version
Skills recorded test-driven-development (complete read); write-tests (complete read); nemoclaw-contributor-create-pr (complete read) Skill reads to cutoff, earlier in the same session (#14491); write-tests' tofu-test reference not read
Instruction files recorded AGENTS.md (injected); WRITING.md (complete read); internal-docs/design/scope.md (complete read); .github/PULL_REQUEST_TEMPLATE.md (complete read); .github/SESSION_REPORT_TEMPLATE.md (complete read) Injections and reads to cutoff; internal-docs/contributing/testing.md was read with its middle truncated, so it is not counted
Tool calls recorded typescript: 131 Includes failed calls and the session's earlier #14491 work, to cutoff; nested host calls inside each program are not counted
Tokens recorded input: 18827855; cached input: 18278160; output: 91361 Sum of assistant message usage (input + cacheRead + cacheWrite; cacheRead; output) to cutoff, including the earlier #14491 work
Session window recorded 2026-11-16T15:41Z to 2026-11-16T19:29Z; 228 min First event to cutoff, including idle time and the earlier #14491 work
Compactions recorded 0 Complete record to cutoff; context was trimmed with session summaries and elisions, not compactions
Models recorded claude-opus-5-5 Model change entry; no later changes
Reasoning levels recorded high Thinking-level entry; no later changes

@github-actions

Copy link
Copy Markdown
Contributor

…ntent record 22 makes moot

Signed-off-by: Carlos Villela <[email protected]>
@cv
cv merged commit bf3ddaa into v1 Nov 16, 2026
69 of 70 checks passed
@cv
cv deleted the cv/docker-memory-label branch November 16, 2026 20:05
@wscurran wscurran added area: local-models Local model providers, downloads, launch, or connectivity bug-fix PR fixes a bug or regression platform: container Affects Docker, containerd, Podman, or images v1 NemoClaw v1 branch labels Nov 16, 2026
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: local-models Local model providers, downloads, launch, or connectivity bug-fix PR fixes a bug or regression platform: container Affects Docker, containerd, Podman, or images v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants