Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CUDA ¶
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 ¶
NewCUDAImageFromEnv creates a CUDA image from the input environment. The environment is a list of strings of the form ENVAR=VALUE.
func NewCUDAImageFromSpec ¶
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) VisibleDevices
DevicesFromEnvvars returns the devices requested by the image through environment variables
func (CUDA) GetDriverCapabilities ¶ added in v1.12.0
func (i CUDA) GetDriverCapabilities() DriverCapabilities
GetDriverCapabilities returns the requested driver capabilities.
func (CUDA) GetRequirements ¶
GetRequirements returns the requirements from all NVIDIA_REQUIRE_ environment variables.
func (CUDA) HasDisableRequire ¶
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
type DriverCapabilities ¶ added in v1.12.0
type DriverCapabilities map[DriverCapability]bool
DriverCapabilities represents the NVIDIA_DRIVER_CAPABILITIES set for the specified image.
func (DriverCapabilities) Any ¶ added in v1.12.0
func (c DriverCapabilities) Any(capabilities ...DriverCapability) bool
Any checks whether any of the specified capabilites are set
func (DriverCapabilities) Has ¶ added in v1.12.0
func (c DriverCapabilities) Has(capability DriverCapability) bool
Has check whether the specified capability is selected.
type DriverCapability ¶ added in v1.12.0
type DriverCapability string
DriverCapability represents the possible values of NVIDIA_DRIVER_CAPABILITIES
const ( DriverCapabilityAll DriverCapability = "all" DriverCapabilityCompat32 DriverCapability = "compat32" DriverCapabilityCompute DriverCapability = "compute" DriverCapabilityDisplay DriverCapability = "display" DriverCapabilityGraphics DriverCapability = "graphics" DriverCapabilityNgx DriverCapability = "ngx" DriverCapabilityUtility DriverCapability = "utility" DriverCapabilityVideo DriverCapability = "video" )
Constants for the supported driver capabilities
type VisibleDevices ¶ added in v1.12.0
VisibleDevices represents the devices selected in a container image through the NVIDIA_VISIBLE_DEVICES or other environment variables
func NewVisibleDevices ¶ added in v1.12.0
func NewVisibleDevices(envvars ...string) VisibleDevices
NewVisibleDevices creates a VisibleDevices based on the value of the specified envvar.