Skip to main content
Workspaces have no GPU. GPU sandboxes give agents scoped access to cloud GPUs, powered by Modal, through the replicas gpu CLI.

What it enables

The CLI is installed in every workspace and authenticated automatically. Agents can start GPU sandboxes, copy code in, run commands with streamed output, run long jobs in the background, and copy results back. Each workspace can only see and control its own GPU sandboxes, and provider credentials are never exposed inside workspaces.

Example

This starts an H100 sandbox, copies the current directory in (respecting .gitignore), streams the command’s output, copies outputs/ back, and stops the sandbox. For longer sessions:
Run replicas gpu --help for every option, including --image for any public registry image and --port to expose a port as a public HTTPS URL.

GPUs

T4, L4, A10G, L40S, A100, A100-80GB, H100, H200, and B200, with up to 8 GPUs per sandbox (for example --gpu H100:4). The default is an L4 with a PyTorch image.

Limits

  • 3 running sandboxes per workspace and 10 per organization
  • 1-hour lifetime by default, up to 24 hours with --timeout
  • Stops after 10 minutes with no running command by default, up to 1 hour with --idle-timeout
  • 1 GiB per push or pull; download larger datasets inside the sandbox
  • Sandboxes stop when their workspace sleeps, is archived, or is deleted

Billing

GPU sandboxes are billed at cost and count toward included usage. See Billing.