nemo_gym.sandbox.providers.docker.provider
nemo_gym.sandbox.providers.docker.provider
Docker sandbox provider: one long-lived container per sandbox, driven via the docker CLI.
Module Contents
Classes
Functions
Data
DOCKER_MISSING_CONTAINER_MARKERS
API
Bases: SandboxCreateError
Raised when Docker cannot create a sandbox.
Bases: SandboxCreateVerificationError
Raised when a new container fails its readiness probe.
Sandbox provider backed by the local Docker CLI / daemon.
Configured exec shell, else bash when the image has it (for conda source), else sh.
Run a docker CLI command as (return_code, stdout, stderr); SIGKILL the group on timeout.
Poll the readiness probe until it passes stable_count times or the deadline elapses.
Force-remove the container (already-gone counts as success).
Start a detached keep-alive container (image ENTRYPOINT overridden) and probe readiness.
spec.ttl_s bounds the lifetime (the keep-alive sleeps for it and --rm self-removes on
exit). spec.provider_options may carry volumes (-> -v) and run_args (extra run
flags). A half-created container is force-removed on any failure.
Download one container file to the host.
Run <shell> -c <command> via docker exec; never raises for command failure.
user maps to --user (root/0 -> 0). A timeout kills the local docker client only; the
in-container process is reaped when the sandbox is closed.
Container status via docker inspect (missing -> STOPPED; error/timeout -> UNKNOWN).
Upload one host file (creates the parent dir; the file lands owned by root).
argv copy with --env KEY=VALUE values masked, so timeouts/logs don’t leak secrets.