Skip to content

build: declare CODE_GEN_SANDBOX_IMAGE as a Dockerfile build arg - #5258

Merged
kajalj22 merged 1 commit into
mainfrom
kajalj/dockerfile-code-gen-sandbox-arg
Nov 18, 2026
Merged

kajalj22 merged 1 commit into
mainfrom
kajalj/dockerfile-code-gen-sandbox-arg

Conversation

@kajalj22

Copy link
Copy Markdown
Contributor

What does this PR do?

Declares CODE_GEN_SANDBOX_IMAGE as a build arg in the release stage of docker/Dockerfile, next to NEMO_GYM_PREFETCH_CONFIGS.

Why

When NEMO_GYM_PREFETCH_CONFIGS is set, the release stage runs the Gym prefetch dry run, which starts every server in those configs. Gym's code_gen server now rejects a null sandbox_config.image:

pydantic_core.ValidationError: 1 validation error for CompCodingResourcesServerConfig
  Value error, sandbox_config.image is required for code verification
RuntimeError: Dry run failed to set up 1 server.

code_gen reads the image from ${oc.env:CODE_GEN_SANDBOX_IMAGE,null}. Docker only exposes a build arg to RUN steps when the Dockerfile declares it, so without this line the image builder cannot hand the value in and any gym image that prefetches code_gen fails to build.

No default on purpose: a build that does not pass the arg behaves exactly as before.

Test plan

  • Image build with --build-arg NEMO_GYM_PREFETCH_CONFIGS=... --build-arg CODE_GEN_SANDBOX_IMAGE=<image> gets past the code_gen dry run.
  • Image build without the new arg is unchanged.

🤖 Generated with Claude Code

The release stage runs examples/nemo_gym/prefetch_venvs.py when
NEMO_GYM_PREFETCH_CONFIGS is set. That dry run starts every Gym server
in those configs, and code_gen now rejects a null sandbox image, so an
image build that prefetches code_gen fails unless CODE_GEN_SANDBOX_IMAGE
is in the build environment. Docker only exposes a build arg to RUN
steps that the Dockerfile declares, so declare it with no default.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: Kajal Jain <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Nov 17, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@kajalj22 kajalj22 added the CI:L1 Run doctests, unit tests, and functional tests label Nov 17, 2026
@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test 6ebc9c0

@kajalj22

Copy link
Copy Markdown
Contributor Author

/review-approve

@kajalj22
kajalj22 enabled auto-merge (squash) November 17, 2026 01:14

@svcnvidia-nemo-ci svcnvidia-nemo-ci left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No qualifying findings in the Dockerfile change.

Static inspection covered the argument's stage scope and its propagation through the prefetch helper. The reusable builder already forwards arbitrary build arguments. I did not run builds, tests or lint, and CI results were not supplied. The mounted Gym submodule is empty, so I could not independently verify its resolver or null-image validator.

Review generated by codex. This was a full review. Request a full review with /review reset=true.

@kajalj22
kajalj22 disabled auto-merge November 18, 2026 00:18
@kajalj22
kajalj22 merged commit d67af06 into main Nov 18, 2026
189 of 194 checks passed
@kajalj22
kajalj22 deleted the kajalj/dockerfile-code-gen-sandbox-arg branch November 18, 2026 00:18
jthomson04 added a commit to jthomson04/RL that referenced this pull request Nov 18, 2026
…Q clear fix) into jthomson04/dynamo-1.7

Brings in NVIDIA-NeMo#5258, NVIDIA-NeMo#4845, NVIDIA-NeMo#5141 and NVIDIA-NeMo#5201. Git merged the six files both sides changed without a conflict. pyproject.toml, uv.lock and the submodule pins are unchanged.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Signed-off-by: jthomson04 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:L1 Run doctests, unit tests, and functional tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants