feat(sandbox): support Docker Compose on E2B-compatible gateways - #3377
Draft
hemildesai wants to merge 2 commits into
Draft
hemildesai wants to merge 2 commits into
hemildesai wants to merge 2 commits into
Conversation
hemildesai
added this pull request to stack #3378
September 14, 2026 20:00
Contributor
|
🌿 Preview your docs: https://nvidia-preview-codex-sandbox-compose-e2b.docs.buildwithfern.com/nemo/gym Here are the markdown pages you've updated: |
Add opt-in guest TCP relays, configurable service endpoints and runtime checks, plus shell and upload controls for compatible gateways. Keep the Compose adapter and public sandbox API unchanged. Co-Authored-By: Codex <noreply@openai.com> Signed-off-by: Hemil Desai <hemild@nvidia.com>
Keep deployment requirements and configuration in the guide; move benchmark-specific validation details to the PR record. Clarify that peer names resolve outside the loopback address range. Signed-off-by: Hemil Desai <hemild@nvidia.com>
hemildesai
force-pushed
the
codex/sandbox-compose-e2b
branch
from
September 15, 2026 00:14
58c8a4f to
e56079f
Compare
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.
What does this PR do?
Stacked on #3332. Enable the Compose adapter to launch services through E2B-compatible gateways, including AgentENV, without changing infrastructure or the public sandbox API.
The provider runs opt-in, authenticated TCP-over-WebSocket relays inside Linux guests. Configurable endpoints preserve service names and declared TCP ports; localhost forwarding supports
network_mode: service:.... Runtime probes validate capabilities and shared-memory requests. Optional shell selection supports images without Bash, and chunked uploads accommodate gateway request limits. Empty gateway 404 responses are normalized for idempotent cleanup.Templates are built explicitly from official images using the existing E2B builder. Guests need Python, aiohttp, pyroute2, root, and NET_ADMIN. Duplicate declared service ports, UDP, and shared writable volumes are rejected. The guide covers configuration and reconnect ownership.
Configuration and scope
Image mapping, template resources, guest package setup, gateway routing, service users, startup commands, and environment variables remain configuration or upstream provisioning. No controller dependencies, Docker executable, image inspection, or benchmark-specific provider logic are added.
The simplification review retained the runtime implementation: AgentENV denies direct VM peer traffic before configurable egress rules, so gateway configuration alone cannot provide Compose TCP networking. Non-loopback guest addresses keep peer names distinct from localhost. The SDK hardcodes Bash and has no shell-selection parameter; multipart streaming still sends one request and cannot bypass gateway request-size limits. The entrypoint supports the adapter's keepalive process; runtime checks enforce requested capabilities and shared memory. Removing these pieces would change supported behavior. The follow-up edit only shortens duplicated and benchmark-specific guide text; it removes no runtime code or configuration.
Validation:
24c9cdca6(2026-09-14): each reward was 1 and every verifier exited successfully. The E2B runtime is unchanged from that run; the subsequent merge brought in parent shared-memory metadata support. KV reached 7.13x speedup with four-vCPU templates. The paginated cleanup audit found no remaining validation sandboxes.pre-commit run --all-filespassed. Fern check: zero errors, one existing warning.Checklist
pre-commit run --all-files).git commit -s).