rlmesh.SandboxRuntime

classExperimentalfrom rlmesh import SandboxRuntime[source]

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 use devices with a CDI ref.
  • devices: docker run --device entries, e.g. ["nvidia.com/gpu=all"] (a CDI device ref – the full graphics+compute driver) or a /dev node.
  • volumes: docker run -v mounts, e.g. ["/host/assets:/ctr/assets", "/host/ro:/ctr/ro:ro"].
  • user: docker run --user passthrough – an int uid or a "uid[:gid]" string. Set it to the owner of writable volume mounts (typically os.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.

gpus

attribute[source]
gpus: str | int | None

devices

attribute[source]
devices: Sequence[str] | None

volumes

attribute[source]
volumes: Sequence[str] | None

user

attribute[source]
user: str | int | None