Documentation ¶
Index ¶
- func Merge(modifiers ...oci.SpecModifier) oci.SpecModifier
- func NewCDIModifier(logger *logrus.Logger, cfg *config.Config, ociSpec oci.Spec) (oci.SpecModifier, error)
- func NewCSVModifier(logger *logrus.Logger, cfg *config.Config, ociSpec oci.Spec) (oci.SpecModifier, error)
- func NewGDSModifier(logger *logrus.Logger, cfg *config.Config, ociSpec oci.Spec) (oci.SpecModifier, error)
- func NewGraphicsModifier(logger *logrus.Logger, cfg *config.Config, ociSpec oci.Spec) (oci.SpecModifier, error)
- func NewMOFEDModifier(logger *logrus.Logger, cfg *config.Config, ociSpec oci.Spec) (oci.SpecModifier, error)
- func NewModifierFromDiscoverer(logger *logrus.Logger, d discover.Discover) (oci.SpecModifier, error)
- func NewStableRuntimeModifier(logger *logrus.Logger, nvidiaContainerRuntimeHookPath string) oci.SpecModifier
- func NewTegraPlatformFiles(logger *logrus.Logger) (oci.SpecModifier, error)
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 *logrus.Logger, 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 *logrus.Logger, cfg *config.Config, ociSpec oci.Spec) (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 *logrus.Logger, cfg *config.Config, ociSpec oci.Spec) (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 *logrus.Logger, cfg *config.Config, ociSpec oci.Spec) (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 *logrus.Logger, cfg *config.Config, ociSpec oci.Spec) (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 *logrus.Logger, 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 *logrus.Logger, 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.
func NewTegraPlatformFiles ¶
func NewTegraPlatformFiles(logger *logrus.Logger) (oci.SpecModifier, error)
NewTegraPlatformFiles creates a modifier to inject the Tegra platform files into a container.
Types ¶
This section is empty.