Best sandbox · GPU workloads
The best sandbox for GPU workloads
Updated
Agents that fine-tune, run inference or crunch data on a GPU need the card inside the sandbox without giving the code the rest of the host. kosa8 can hand a whole host GPU to one microVM on a Linux machine with KVM, or to a gVisor container sandbox where a VM cannot boot. It is new, it has limits (no checkpoint, rewind or fork while a GPU is attached), and for elastic GPU fleets a GPU cloud is the better choice.
01What GPU work needs from a sandbox
GPU code is usually the least reviewed code in a stack: notebooks, research repositories, model files from the internet. It needs the device, the driver and lots of memory; it does not need your SSH keys or your other tenants' data.
Sharing is the hard part. GPUs keep memory between jobs, so the safe default is one card per trust domain at a time.
02Checklist for choosing one
- The GPU passed through, not emulated. The workload sees the real card.
- Exclusive while in use. No other sandbox shares the card.
- Host isolation. Its own kernel, or a user-space kernel such as gVisor.
- Memory sized to the job. Models are large.
- A network policy. Model downloads allowed, everything else closed.
- Elastic capacity if you need it. Many GPUs on demand is a cloud problem.
03How kosa8 meets it
On a Linux host with KVM, kosa8 doctor lists the cards and whether each is ready. Then create a sandbox with one.
kosa8 doctor kosa8 sandbox create train --gpu any --memory 32768 --cpus 8 --egress-allow huggingface.co --egress-allow '*.huggingface.co' kosa8 sandbox ls
--gpu takes a PCI address such as 0000:01:00.0 (repeatable), any for one free card, or all. The card is the sandbox's alone while it runs. A sandbox with a GPU cannot be checkpointed, rewound or forked; stopping it keeps its disk. kosa8's docs do not yet cover driver and CUDA setup inside a GPU sandbox, so install what your card and framework need and test it before relying on it.
On machines rented as VMs, where a nested microVM may not boot, --backend docker runs the sandbox as a gVisor container on Docker Engine (runsc must be installed) and --gpu takes any, all, or an index or UUID as nvidia-smi -L shows. Container sandboxes cannot be checkpointed, rewound or forked yet.
04When another option fits better
- GPU clouds. If you need many GPUs for an afternoon, providers such as Modal, RunPod, Lambda or CoreWeave rent them by the second or hour. kosa8 Cloud's templates today are CPU-only.
- Kubernetes with a GPU operator. If your platform team already schedules GPUs on Kubernetes, isolate with the runtime they support rather than adding another layer.
- Shared GPUs for many small jobs. kosa8 gives a whole card to one sandbox; MIG or time-slicing on a managed platform suits many small tenants better.
05FAQ
Which hosts support kosa8 GPU sandboxes?
Linux hosts with KVM for microVM sandboxes, and hosts with Docker Engine plus gVisor's runsc for container sandboxes. macOS hosts do not pass GPUs through.
Can I fork a sandbox that has a GPU?
No. A sandbox with a GPU cannot be checkpointed, rewound or forked; stopping it keeps its disk.
Is GPU memory cleared between sandboxes?
kosa8 does not document clearing GPU memory between sandboxes, so give a card to one team or tenant at a time.
Does kosa8 Cloud have GPUs?
Not today: its templates are base, python and node. Use your own GPU host, registered as an own host, or a GPU cloud.
06Get started
Install kosa8 on a Mac, Linux or Windows (WSL2) machine, or make an account and run the same sandboxes on kosa8 Cloud.
07Sources
Related
- How do I run an AI agent sandbox on my own machine instead of the cloud?
- Docker containers vs microVMs: which isolates an AI agent better?
- How do I point a coding agent at a local model?
- The best sandbox for air-gapped environments
- All best-sandbox pages
Updated 2026-11-14