modifier

package
v1.16.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Merge

func Merge(modifiers ...oci.SpecModifier) oci.SpecModifier

Merge merges a set of OCI specification modifiers as a list. This can be used to compose modifiers.

func NewCDIModifier

func NewCDIModifier(logger logger.Interface, cfg *config.Config, ociSpec oci.Spec) (oci.SpecModifier, error)

NewCDIModifier creates an OCI spec modifier that determines the modifications to make based on the CDI specifications available on the system. The NVIDIA_VISIBLE_DEVICES environment variable is used to select the devices to include.

func NewCSVModifier

func NewCSVModifier(logger logger.Interface, cfg *config.Config, image image.CUDA) (oci.SpecModifier, error)

NewCSVModifier creates a modifier that applies modications to an OCI spec if required by the runtime wrapper. The modifications are defined by CSV MountSpecs.

func NewFeatureGatedModifier added in v1.15.0

func NewFeatureGatedModifier(logger logger.Interface, cfg *config.Config, image image.CUDA) (oci.SpecModifier, error)

NewFeatureGatedModifier creates the modifiers for optional features. These include:

NVIDIA_GDS=enabled
NVIDIA_MOFED=enabled
NVIDIA_NVSWITCH=enabled
NVIDIA_GDRCOPY=enabled

If not devices are selected, no changes are made.

func NewGraphicsModifier added in v1.12.0

func NewGraphicsModifier(logger logger.Interface, cfg *config.Config, image image.CUDA, driver *root.Driver) (oci.SpecModifier, error)

NewGraphicsModifier constructs a modifier that injects graphics-related modifications into an OCI runtime specification. The value of the NVIDIA_DRIVER_CAPABILITIES environment variable is checked to determine if this modification should be made.

func NewModifierFromDiscoverer

func NewModifierFromDiscoverer(logger logger.Interface, d discover.Discover) (oci.SpecModifier, error)

NewModifierFromDiscoverer creates a modifier that applies the discovered modifications to an OCI spec if required by the runtime wrapper.

func NewStableRuntimeModifier

func NewStableRuntimeModifier(logger logger.Interface, nvidiaContainerRuntimeHookPath string) oci.SpecModifier

NewStableRuntimeModifier creates an OCI spec modifier that inserts the NVIDIA Container Runtime Hook into an OCI spec. The specified logger is used to capture log output.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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