19. GPU jobs (Bazzite)
19. GPU jobs (Bazzite)¶
Result: works with the driver ABI pinned. gVisor release-20261116.0
doesn't know the desktop's NVIDIA driver (620.70.06), but with
--nvproxy-driver-version=620.51.03, a CRI pod under gVisor runs
nvidia-smi and a CUDA vectorAdd on the RTX 3080, as runc does.
--nvproxy-allow-unsupported-driver alone doesn't help: the sandbox dies at
boot, and the pod is left stuck.
Setup (2026-11-23)¶
- The desktop as in #15 (Bazzite 45.20261117, containerd 2.4.2, gVisor
release-20261116.0), plus what
bazzite-dx-nvidiaalready ships: nvidia-container-toolkit 1.20.2 and its CDI spec,/etc/cdi/nvidia.yaml. containerd 2.x's CRI reads CDI specs without configuration. - In gVisor's source, nvproxy looks the driver version up in its ABI table
and refuses one that isn't there.
--nvproxy-allow-unsupported-driveronly admits versions that are in the table and marked unsupported (pkg/sentry/devices/nvproxy/nvproxy.go).--nvproxy-driver-versionreplaces the autodetected version, and runsc doesn't compare it with the installed driver (runsc/sandbox/sandbox.go). gVisor's master on 2026-11-23 still ends at 620.51.03. - Gavin ran
spike/install_bazzite_gpu.shonce withsudo. It adds two CRI handlers besideruncandrunsc, each with its own runsc config file:runsc-gpu-auto(nvproxy,nvproxy-allow-unsupported-driver) andrunsc-gpu-pinned(nvproxy,nvproxy-driver-version = "620.51.03"). spike/cri_gpu.py --runs 3: for each handler, one pod per job with the GPU attached as the CDI devicenvidia.com/gpu=all, runningnvidia-smiand then the vectorAdd sample from gVisor's GPU guide (nvcr.io/nvidia/k8s/cuda-sample:vectoradd-cuda11.7.1-ubi8).
Raw results¶
| Handler | nvidia-smi |
vectorAdd |
|---|---|---|
| runc | exit 0, 0.65–0.74 s | Test PASSED, 0.88–0.91 s |
| runsc-gpu-pinned | exit 0, 0.72–0.74 s | Test PASSED, 0.94–1.17 s |
| runsc-gpu-auto | runp fails after 60 s |
same |
Same in all three runs. For runsc-gpu-auto, containerd logs setting up
network: ... urpc method "containerManager.SetNetworkArgs" failed:
connection reset by peer: the sandbox exited before the container started,
then times out tearing the pod down. Each failed pod stays NotReady with
its containerd-shim-runsc-v1 running and no sandbox; crictl rmp -f
times out on all six.
What we learned¶
- A GPU job runs under gVisor on a driver nvproxy doesn't list, if the driver's ioctls haven't changed from the pinned ABI where the job uses them. Two small programs say nothing about the rest: a bigger CUDA job, or a later driver, could hit a layout that changed.
- gVisor's overhead on these jobs is small: 0.05–0.3 s per job over
runc, mostly the sandbox start. - A runsc GPU sandbox that dies at boot is expensive to fail on: 60 s
before the error, and a shim and pod record left behind that
crictlcan't remove. - Not checked: the sandbox's own error for
runsc-gpu-auto(expected, from the source:unsupported Nvidia driver version: 620.70.06; needs runsc debug logs), why the shims stop answering, and SELinux denials.
What it changes¶
- GPU jobs on the desktop are possible in v1 if the runner pins nvproxy's driver ABI to the newest one gVisor knows, which needs a job-level sanity check, since a mismatch may only show up inside a job.
- The runner must decide the GPU handler's flags before starting a pod:
compare the host driver with
runsc nvproxy list-supported-drivers, and never let a sandbox discover the mismatch at boot. - Cleanup: the six stuck shims need
sudo killandcrictl rmp, or a reboot.