How to give a runner a GPU (beta)¶
install.sh doesn't set up GPUs, so you add the warden's GPU section by
hand.
Before you start¶
The host needs an NVIDIA GPU, nvidia-container-toolkit's CDI spec
(/etc/cdi/nvidia.yaml), and a containerd CRI handler that runs runsc
with nvproxy = "true". If the loaded driver is newer than the last entry
of runsc nvproxy list-supported-drivers, the handler's runsc config also
sets nvproxy-driver-version to that last entry. Use this handler, not
NVIDIA's own nvidia handler (see warden.json GPU
section).
Experiments 19 and
20 show this setup working.
Steps¶
- Check the handler with a CUDA sample before giving it to the warden. A GPU sandbox that dies at boot leaves a shim behind.
- Read the loaded driver:
cat /sys/module/nvidia/version. -
Add a
gpusection to/etc/allmyram/warden.json: -
Restart the warden:
sudo systemctl restart allmyram-warden.
Jobs now ask for the GPU with allmyram run --gpu.
After a driver update¶
The warden refuses GPU jobs while the loaded driver isn't the one in
driver. Check the handler again with the new driver, then change
driver.
Rerunning install.sh rewrites warden.json without the section. Add it
again afterwards.