mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Implement experimental modifier for NVIDIA Container Runtime
This change enables the experimental mode of the NVIDIA Container Runtime. If enabled, the nvidia-container-runtime.discover-mode config option is queried to determine how required OCI spec modifications should be defined. If "legacy" is selected, the existing NVIDIA Container Runtime hooks is discovered and injected into the OCI spec. Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -46,9 +46,13 @@ func newNVIDIAContainerRuntime(logger *logrus.Logger, cfg *config.RuntimeConfig,
|
||||
|
||||
var specModifier oci.SpecModifier
|
||||
if cfg.Experimental {
|
||||
return nil, fmt.Errorf("experimental mode is not supported")
|
||||
specModifier, err = modifier.NewExperimentalModifier(logger, cfg)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to construct experimental modifier: %v", err)
|
||||
}
|
||||
} else {
|
||||
specModifier = modifier.NewStableRuntimeModifier(logger)
|
||||
}
|
||||
specModifier = modifier.NewStableRuntimeModifier(logger)
|
||||
|
||||
// Create the wrapping runtime with the specified modifier
|
||||
r := runtime.NewModifyingRuntimeWrapper(
|
||||
|
||||
Reference in New Issue
Block a user