nvidia

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 WithGPUs

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

WithGPUs adds NVIDIA gpu support to a container

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"
)

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 ...int) 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL