Also ignore CDI errors if required

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2024-02-09 14:17:27 +01:00
parent cc4c2783a3
commit cd7d586afa

View File

@ -369,7 +369,14 @@ func Install(cli *cli.Context, opts *options) error {
log.Errorf("Ignoring error: %v", fmt.Errorf("error creating device nodes: %v", err))
}
return generateCDISpec(opts, nvidiaCTKPath)
err = generateCDISpec(opts, nvidiaCTKPath)
if err != nil && !opts.ignoreErrors {
return fmt.Errorf("error generating CDI specification: %v", err)
} else if err != nil {
log.Errorf("Ignoring error: %v", fmt.Errorf("error generating CDI specification: %v", err))
}
return nil
}
// installContainerLibraries locates and installs the libraries that are part of