Skip to content

sandbox: add pty capability to e2b sandbox provider - #4784

Open
psarna wants to merge 1 commit into
mainfrom
sarna/e2bpty
Open

psarna wants to merge 1 commit into
mainfrom
sarna/e2bpty

Conversation

@psarna

@psarna psarna commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds pty to e2b sandbox provider, so that it is usable with sandbox/shell.py script.

Validation

With local e2b-compatible server:

export E2B_API_KEY=test-key \
       E2B_API_URL=http://127.0.0.1:10129 \
       E2B_SANDBOX_URL=http://127.0.0.1:10129

CFG=$(mktemp -d)/e2b.yaml
cat > "$CFG" <<'EOF'
sandbox:
  e2b:
    connection:
      api_key: ${oc.env:E2B_API_KEY,null}
      api_url: ${oc.env:E2B_API_URL,null}
      sandbox_url: ${oc.env:E2B_SANDBOX_URL,null}
    create:
      template_map:
        "docker.io/library/python:3.12-slim": "docker.io/library/python:3.12-slim"
EOF

.venv/bin/python -m nemo_gym.sandbox.shell --config "$CFG"

Rollouts

Compatibility and benchmark impact

Checklist

  • I have read the contributing guidelines.
  • The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs.
  • Tests added or updated and pass locally, or N/A for docs-only / non-code changes (so CI unit/server checks pass when applicable).
  • Documentation added or updated, or N/A with justification.
  • Pre-commit checks pass locally (pre-commit run --all-files) (so CI lint/format checks pass).
  • New source files include the required Apache-2.0 SPDX header.
  • All commits have DCO sign-off (git commit -s) (so the DCO check passes).

@copy-pr-bot

copy-pr-bot Bot commented Oct 20, 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.

@psarna

psarna commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 8757498

@nemo-automation-bot
nemo-automation-bot Bot requested a review from a team October 20, 2026 10:12
@yaoyu-33 yaoyu-33 added area:sandbox Sandbox providers, isolation, and sandbox runtime contracts complexity:low Localized change in one scope with a small, straightforward review surface feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer labels Oct 20, 2026
@psarna

psarna commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 7eb8d94

So that it is usable with sandbox/shell.py script

Signed-off-by: Piotr Sarna <psarna@nvidia.com>

This branch was previously deployed

1 inactive (outdated) deployment
public — 7eb8d945 Deployed Oct 21, 2026 by copy-pr-bot[bot] via release / finalize / notify #6191
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:sandbox Sandbox providers, isolation, and sandbox runtime contracts complexity:low Localized change in one scope with a small, straightforward review surface feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer sla:triage-overdue Review assignment is over the one-business-day SLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants