image

package
v1.11.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CUDA

type CUDA map[string]string

CUDA represents a CUDA image that can be used for GPU computing. This wraps a map of environment variable to values that can be used to perform lookups such as requirements.

func NewCUDAImageFromEnv

func NewCUDAImageFromEnv(env []string) (CUDA, error)

NewCUDAImageFromEnv creates a CUDA image from the input environment. The environment is a list of strings of the form ENVAR=VALUE.

func NewCUDAImageFromSpec

func NewCUDAImageFromSpec(spec *specs.Spec) (CUDA, error)

NewCUDAImageFromSpec creates a CUDA image from the input OCI runtime spec. The process environment is read (if present) to construc the CUDA Image.

func (CUDA) DevicesFromEnvvars added in v1.11.0

func (i CUDA) DevicesFromEnvvars(envVars ...string) []string

DevicesFromEnvvars returns the devices requested by the image through environment variables

func (CUDA) GetRequirements

func (i CUDA) GetRequirements() ([]string, error)

GetRequirements returns the requirements from all NVIDIA_REQUIRE_ environment variables.

func (CUDA) HasDisableRequire

func (i CUDA) HasDisableRequire() bool

HasDisableRequire checks for the value of the NVIDIA_DISABLE_REQUIRE. If set to a valid (true) boolean value this can be used to disable the requirement checks

func (CUDA) IsLegacy

func (i CUDA) IsLegacy() bool

IsLegacy returns whether the associated CUDA image is a "legacy" image. An image is considered legacy if it has a CUDA_VERSION environment variable defined and no NVIDIA_REQUIRE_CUDA environment variable defined.

Jump to

Keyboard shortcuts

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