rlmesh.torch.SandboxRuntime
Container run-time settings for a sandbox -- docker run flags.
SandboxRuntime(
gpus: str | int | None = None,
devices: Sequence[str] | None = None,
volumes: Sequence[str] | None = None,
user: str | int | None = None,
)Applies whenever the container is run (prebuilt images and build-then-run),
unlike SandboxBuild which only configures the from-source build. The
host-resource knobs sim envs/models need:
gpus:docker run --gpus("all"/ a count /"device=0,1") – legacy GPU injection (CUDA compute only). NOTE: this does not inject the graphics/Vulkan driver; for SAPIEN/Vulkan usedeviceswith a CDI ref.devices:docker run --deviceentries, e.g.["nvidia.com/gpu=all"](a CDI device ref – the full graphics+compute driver) or a/devnode.volumes:docker run -vmounts, e.g.["/host/assets:/ctr/assets", "/host/ro:/ctr/ro:ro"].user:docker run --userpassthrough – an int uid or a"uid[:gid]"string. Set it to the owner of writable volume mounts (typicallyos.getuid()); the container runs--cap-drop ALL, so even root inside it obeys the mount’s permission bits.
Build-from-source attaches none of these (it has no docker run step); set
them only for a prebuilt image source.