feat(sandbox): add Apptainer sandbox provider - #1694
Merged
Conversation
Add an ApptainerProvider implementing the SandboxProvider protocol via the local apptainer CLI: persistent instance lifecycle, exec with user/fakeroot mapping, bind-mount file transfer, status, readiness probe, and teardown. Register it under the name "apptainer" and add unit tests plus a README. Signed-off-by: Arti Jain <artij@nvidia.com>
Signed-off-by: Arti Jain <artij@nvidia.com>
5 tasks
Signed-off-by: Arti Jain <artij@nvidia.com>
Signed-off-by: Arti Jain <artij@nvidia.com>
Parse Claude Code's authoritative num_turns from the stream-json result event and include it in the returned metadata. Signed-off-by: Arti Jain <artij@nvidia.com>
hemildesai
reviewed
Jun 25, 2026
hemildesai
reviewed
Jun 25, 2026
cmunley1
approved these changes
Jun 25, 2026
cmunley1
left a comment
Contributor
There was a problem hiding this comment.
tested with terminalbench
cmunley1
marked this pull request as ready for review
June 25, 2026 22:42
adil-a
approved these changes
Jun 25, 2026
hemildesai
approved these changes
Jun 25, 2026
adil-a
pushed a commit
to adil-a/Gym
that referenced
this pull request
Jun 26, 2026
…iders + flat-only harnesses (NVIDIA-NeMo#1249) PR NVIDIA-NeMo#1694 (feat(sandbox): add Apptainer sandbox provider) adds an apptainer provider at the same paths as ours. We use docker for all evals, so drop our apptainer entirely and let NVIDIA-NeMo#1694 own it on main; the swe_env-specific apptainer nested-grading is deferred to a follow-up PR that re-wires it onto NVIDIA-NeMo#1694's provider (tracked in APPTAINER_PR3_TRACKER.md). - Remove our ApptainerSandboxProvider + the registry apptainer loader (keep docker + opensandbox). - swebench/r2egym harnesses -> flat-only (host-side grading via swebench's official per-repo parser); remove the nested run_local_evaluation path + the apptainer supports_provider gate. The docker flat-grading fix is preserved (gold re-grade 3/3 on docker; swe_env tests 134 passed). - model_endpoint: drop the apptainer egress branch (docker branch is functionally identical). - run_swebench_verified.py: docker-only (drop --provider apptainer + .sif build). - Delete apptainer-only tests; rewrite swebench/r2egym/flat_eval tests flat-only. Note: r2egym is now flat-only without an eval_script source (was nested-only) -> masks as eval_error until the follow-up PR; no active eval config uses r2egym. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Codex <codex@openai.com>
adil-a
pushed a commit
to adil-a/Gym
that referenced
this pull request
Jun 26, 2026
…bed) (NVIDIA-NeMo#1249) Re-add the apptainer sandbox provider (owned by NVIDIA-NeMo#1694 on main) and register it, then wire anyswe onto it so both docker and apptainer backends run end-to-end: - registry: register the apptainer provider loader (was intentionally docker-only pending NVIDIA-NeMo#1694; NVIDIA-NeMo#1694 is now on main). - _instance_image: resolve a local .sif container_formatter verbatim (raw instance_id, no _1776_ tag mangle, no :latest) so the apptainer provider can instance-start an on-disk image with no registry pull. - _provider: for apptainer, bind /trajectories_mount, /nemo_gym_mount and /agent_deps_mount (via exec.default_binds, symmetric with docker run_args) and add --writable-tmpfs so the agent can edit /testbed (read-only sif otherwise). - _grading_provider: add --writable-tmpfs for the nested-grading sandbox too. Verified: anyswe_hermes (gpt-5.5) on 2 SWE-bench Verified instances grades 1/2 resolved identically on docker (local images) and apptainer (local sifs), all rows unmasked. Docker behavior unchanged (backward-compatible _instance_image). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Codex <codex@openai.com>
adil-a
pushed a commit
to adil-a/Gym
that referenced
this pull request
Jun 27, 2026
Align docstrings with the current code: all built-in families grade host-side (flat), so correct the lingering 'nested/apptainer-only supports_provider' narrative in harness.py, harnesses/__init__.py and flat_eval.py (the nested path was removed in PR NVIDIA-NeMo#1694; with_flat_eval() is a no-op returning self). Document the docker/ apptainer split in anyswe _provider; note is_eval is accepted but unused; fix test docstrings (FakeSandbox -> _FakeProvider, 'three layers' -> two, swe_rebench gate). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Codex <codex@openai.com>
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 an ApptainerProvider implementing the SandboxProvider protocol via the local apptainer CLI: persistent instance lifecycle, exec with user/fakeroot mapping, bind-mount file transfer, status, readiness probe, and teardown. Register it under the name "apptainer" and add unit tests plus a README.