package nvidia
import "github.com/containerd/containerd/contrib/nvidia"
Index ¶
- Constants
- func WithAllCapabilities(c *config) error
- func WithAllDevices(c *config) error
- func WithGPUs(opts ...Opts) oci.SpecOpts
- func WithNoCgroups(c *config) error
- type Capability
- type Opts
Constants ¶
const NvidiaCLI = "nvidia-container-cli"
NvidiaCLI is the path to the Nvidia helper binary
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 WithGPUs ¶
WithGPUs adds NVIDIA gpu support to a 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
Source Files ¶
- Version
- v1.7.5
- Published
- Aug 25, 2023
- Platform
- js/wasm
- Imports
- 9 packages
- Last checked
- 3 minutes ago –
Tools for package owners.