Documentation ¶
Index ¶
Constants ¶
const NvidiaCLI = "nvidia-container-cli"
NvidiaCLI is the path to the Nvidia helper binary
Variables ¶
This section is empty.
Functions ¶
func WithAllCapabilities ¶
func WithAllCapabilities(c *config) error
WithAllCapabilities adds all capabilities to the container for the gpus
func WithAllDevices ¶
func WithAllDevices(c *config) error
WithAllDevices adds all gpus to the container
func WithNoCgroups ¶
func WithNoCgroups(c *config) error
WithNoCgroups passes --no-cgroups option to nvidia-container-cli.
Types ¶
type Capability ¶
type Capability string
Capability specifies capabilities for the gpu inside the container Detailed explanation of options can be found: https://github.com/nvidia/nvidia-container-runtime#supported-driver-capabilities
const ( // Compute capability Compute Capability = "compute" // Compat32 capability Compat32 Capability = "compat32" // Graphics capability Graphics Capability = "graphics" // Utility capability Utility Capability = "utility" // Video capability Video Capability = "video" // Display capability Display Capability = "display" )
func AllCaps ¶
func AllCaps() []Capability
AllCaps returns the complete list of supported Nvidia capabilities.
type Opts ¶
type Opts func(*config) error
Opts are options for configuring gpu support
func WithCapabilities ¶
func WithCapabilities(caps ...Capability) Opts
WithCapabilities adds the specified capabilities to the container for the gpus
func WithDeviceUUIDs ¶
WithDeviceUUIDs adds the specific device UUID to the container
func WithDevices ¶
WithDevices adds the provided device indexes to the container
func WithLookupOCIHookPath ¶
WithLookupOCIHookPath sets the hook path for the binary via a binary name
func WithOCIHookPath ¶
WithOCIHookPath sets the hook path for the binary
func WithRequiredCUDAVersion ¶
WithRequiredCUDAVersion sets the required cuda version