Repository navigation
lab: container jail on Linux; runtime design (RUNTIME.md) - #19
Merged
Merged
Conversation
srt cannot jail GPU code on Linux: no device passthrough, and each jail gets its own network namespace, so a served engine is unreachable from the clients. On Linux, agent code (tests, profilers, served engines) now runs in one container per command: NVIDIA runtime, --network none, read-only root, non-root user, no capabilities, cpuset leaving cores for the clients. A served port reaches the host through a socat bridge over a unix socket. srt stays on macOS; LAB_JAIL overrides. vm-setup.sh installs docker + NVIDIA Container Toolkit, builds lab-jail, and checks the GPU inside it. lab/RUNTIME.md is the controller/worker design this starts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 9, 2026
# Conflicts: # lab/README.md
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.
Why
srt can't jail GPU code on Linux:
/devwith no device passthrough, so jailed code sees no GPU (found on the H200, Profiler tools: fixes from the H200 run #18);allowLocalBindingonly works on macOS). Reproduced in Docker on Linux.Together these mean
test,profile/trace/kernel/hostprof,bench,equivandsubmitcan't run jailed on a GPU VM.What
lab/safety/container.py: on Linux, one container per jailed command. NVIDIA runtime (--gpuswhennvidia-smiexists),--network none, read-only root, non-root user (uid 10001 when the lab runs as root), all capabilities dropped,no-new-privileges, a process limit, and a cpuset that leaves the first 4 cores to the measurement clients.LAB_JAILpicks the jail;LAB_NO_JAIL=1behaves as before.lab/safety/jail.Dockerfile(lab-jailimage) andpython -m lab.safety.container build.vm-setup.shinstalls Docker and the NVIDIA Container Toolkit, builds the image, and printsjail: gpu okorjail: no GPU in the container.lab/RUNTIME.md: the controller/worker design this starts (trust zones, rules, job interface).Tested
--gpusand the profilers inside the container. That needs a GPU run (vm-setup.shchecks it).Not in this PR
🤖 Generated with Claude Code