View Source
const NvidiaCLI = "nvidia-container-cli"

    NvidiaCLI is the path to the Nvidia helper binary


    This section is empty.


    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

        func WithGPUs(opts ...Opts) oci.SpecOpts

          WithGPUs adds NVIDIA gpu support to a container


          type Capability

          type Capability string

            Capability specifies capabilities for the gpu inside the container Detailed explanation of options can be found:

            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

                  func WithDeviceUUIDs(uuids ...string) Opts

                    WithDeviceUUIDs adds the specific device UUID to the container

                    func WithDevices

                    func WithDevices(ids Opts

                      WithDevices adds the provided device indexes to the container

                      func WithLookupOCIHookPath

                      func WithLookupOCIHookPath(name string) Opts

                        WithLookupOCIHookPath sets the hook path for the binary via a binary name

                        func WithOCIHookPath

                        func WithOCIHookPath(path string) Opts

                          WithOCIHookPath sets the hook path for the binary

                          func WithRequiredCUDAVersion

                          func WithRequiredCUDAVersion(major, minor int) Opts

                            WithRequiredCUDAVersion sets the required cuda version

                            Source Files