pub struct GpuPassthroughConfig {
pub vendor: GpuVendor,
pub devices: Vec<PathBuf>,
pub driver_capabilities: String,
pub visible_devices: String,
pub bind_driver_libraries: bool,
}Expand description
GPU passthrough configuration.
When present on a ContainerConfig, the runtime binds the selected GPU
device nodes (and the minimal driver support files they need) into the
container, installs a cgroup device allowlist, and relaxes the seccomp
ioctl filter so vendor driver ioctls reach the hardware.
See spec/gpu-passthrough.md for the full design.
Fields§
§vendor: GpuVendorVendor selection controlling device discovery.
devices: Vec<PathBuf>Explicit device node overrides. When non-empty, discovery is skipped and exactly these host paths are bound (after validation).
driver_capabilities: StringValue for NVIDIA_DRIVER_CAPABILITIES. Defaults to
DEFAULT_GPU_DRIVER_CAPABILITIES.
visible_devices: StringValue for NVIDIA_VISIBLE_DEVICES. Defaults to
DEFAULT_GPU_VISIBLE_DEVICES.
bind_driver_libraries: boolAttempt to bind host driver userspace libraries (NVIDIA toolkit /
ROCm). Set false when the container rootfs ships its own stack.
Implementations§
Source§impl GpuPassthroughConfig
impl GpuPassthroughConfig
Sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Returns true if passthrough is active (always true for this type;
presence of the Option<GpuPassthroughConfig> is the real switch).
Trait Implementations§
Source§impl Clone for GpuPassthroughConfig
impl Clone for GpuPassthroughConfig
Source§fn clone(&self) -> GpuPassthroughConfig
fn clone(&self) -> GpuPassthroughConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more