You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let actors use NVIDIA GPUs passthrough from their workers.
How to achieve this
We need to inject the relevant info to the actor's OCI spec, and then runsc proxies the driver.
Suggested Approach
Install GPU-Operator on the K8s cluster.
Request GPU resources in a workerpool. This should mount the ateom with relevant NVIDIA binaries and tooling and expose the GPUs to the workers.
When starting, ateom runs nvidia-ctk cdi generate,and takes the device nodes, mounts, hooks, and env and emits them to a CDI file. Hooks run using nvidia-cdi-hook as part of createContainer.
Merge into the actor's OCI spec.
Ateom runs runsc create to build the sandbox with the relevant GPU devices.
The core tension
Running NVIDIA CDI inside an unprivileged gVisor worker has the following issues:
CDI createContainer hooks run in runsc's gofer, which drops to a minimal cap set.
update-ldcache hook mounts /proc to run the hook. we need /proc to be unmasked to support this.
The current ateom-gvisor worker image is distroless, but the NVIDIA toolkit binaries are glibc-dynamic so they can't be exec'd directly; they can be run via a staged glibc loader from a shared volume.
Net: GPU on the unprivileged worker requires hostUsers: false + procMount: Unmasked and that can break cgorup delegation.
Known costs / open issues
Toolkit host-path portability. gpu-operator/EKS install at /usr/local/nvidia/toolkit; GKE keeps it under /home/kubernetes/bin/nvidia. Made configurable via env.
Snapshot/restore with GPU out of scope currently (suspend/resume of a GPU actor).
Activity
feat: CDI-based NVIDIA GPU passthrough into gVisor actor containers (a…