modifier

package
v1.14.3 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 16 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 enviroment 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 NewGDSModifier

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

NewGDSModifier creates the modifiers for GDS devices. If the spec does not contain the NVIDIA_GDS=enabled environment variable no changes are made.

func NewGraphicsModifier added in v1.12.0

func NewGraphicsModifier(logger logger.Interface, cfg *config.Config, image image.CUDA) (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 NewMOFEDModifier

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

NewMOFEDModifier creates the modifiers for MOFED devices. If the spec does not contain the NVIDIA_MOFED=enabled environment variable no changes are 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