Skip to content

GPU Sandboxes

GPU sandboxes give each container direct, dedicated access to host GPU hardware. Unlike most competing platforms (E2B, Daytona), AerolVM passes the full GPU through to the container - no shared tenancy, no synthetic limits.

GPU access requires runtime: "docker" (the default). It is not compatible with gVisor - the API returns an error if both gpus and runtime: "gvisor" are set in the same request.

See Server Setup for host installation (--with-nvidia-gpu / --with-amd-gpu installer flags).

VendorHost requirement
nvidianvidia-container-toolkit installed + NVIDIA drivers present. Install with --with-nvidia-gpu.
amdAMD ROCm installed + amdgpu kernel module loaded. Install with --with-amd-gpu. x86_64 only.
appleDocker Desktop on macOS. No setup needed - Metal GPU support is built into Docker Desktop.

Allocate one GPU:

const sandbox = await client.create({
image: 'nvidia/cuda:12.2.0-base-ubuntu22.04',
gpus: { vendor: 'nvidia', count: 1 },
})

Request all GPUs on the host (count: -1):

const sandbox = await client.create({
image: 'nvidia/cuda:12.2.0-base-ubuntu22.04',
gpus: { vendor: 'nvidia', count: -1 },
})

Pin specific GPUs by device index or UUID:

const sandbox = await client.create({
image: 'nvidia/cuda:12.2.0-base-ubuntu22.04',
gpus: {
vendor: 'nvidia',
count: 2,
deviceIDs: ['GPU-abc123', 'GPU-def456'],
},
})

All AMD GPUs on the host are exposed via /dev/kfd (compute) and /dev/dri (render nodes). The count and deviceIDs fields are ignored for AMD.

const sandbox = await client.create({
image: 'rocm/rocm-terminal',
gpus: { vendor: 'amd' },
})

Requires Docker Desktop on macOS. Metal GPU support is built into Docker Desktop - no additional host setup.

const sandbox = await client.create({
image: 'ubuntu:22.04',
gpus: { vendor: 'apple' },
})