mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Set default spec dirs at config level
This change sets the default CDI spec dirs at a config level instead of when a CDI runtime modifier is constructed. This makes this setting consistent with other options such as the nvidia-ctk path. Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
@@ -48,14 +48,9 @@ func NewCDIModifier(logger logger.Interface, cfg *config.Config, ociSpec oci.Spe
|
||||
}
|
||||
logger.Debugf("Creating CDI modifier for devices: %v", devices)
|
||||
|
||||
specDirs := cdi.DefaultSpecDirs
|
||||
if len(cfg.NVIDIAContainerRuntimeConfig.Modes.CDI.SpecDirs) > 0 {
|
||||
specDirs = cfg.NVIDIAContainerRuntimeConfig.Modes.CDI.SpecDirs
|
||||
}
|
||||
|
||||
m := cdiModifier{
|
||||
logger: logger,
|
||||
specDirs: specDirs,
|
||||
specDirs: cfg.NVIDIAContainerRuntimeConfig.Modes.CDI.SpecDirs,
|
||||
devices: devices,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user