mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
Reenable nvsandboxutils for driver discovery
This change reenables nvsandboxutils for driver discovery. This was disabled due to an error in a specific driver version (v565) so as to not block the release of the DRA driver for ComputeDomains. Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
be6a36c023
commit
872aa2fe1c
@ -108,24 +108,7 @@ func New(opts ...Option) (Interface, error) {
|
|||||||
}
|
}
|
||||||
l.nvmllib = nvml.New(nvmlOpts...)
|
l.nvmllib = nvml.New(nvmlOpts...)
|
||||||
}
|
}
|
||||||
// TODO: Repeated calls to nvsandboxutils.Init and Shutdown are causing
|
l.nvsandboxutilslib = l.getNvsandboxUtilsLib()
|
||||||
// segmentation violations. Here we disabled nvsandbox utils unless explicitly
|
|
||||||
// specified.
|
|
||||||
// This will be reenabled as soon as we have more visibility into why this is
|
|
||||||
// happening and a mechanism to detect and disable this if required.
|
|
||||||
// if l.nvsandboxutilslib == nil {
|
|
||||||
// var nvsandboxutilsOpts []nvsandboxutils.LibraryOption
|
|
||||||
// // Set the library path for libnvidia-sandboxutils
|
|
||||||
// candidates, err := l.driver.Libraries().Locate("libnvidia-sandboxutils.so.1")
|
|
||||||
// if err != nil {
|
|
||||||
// l.logger.Warningf("Ignoring error in locating libnvidia-sandboxutils.so.1: %v", err)
|
|
||||||
// } else {
|
|
||||||
// libNvidiaSandboxutilsPath := candidates[0]
|
|
||||||
// l.logger.Infof("Using %v", libNvidiaSandboxutilsPath)
|
|
||||||
// nvsandboxutilsOpts = append(nvsandboxutilsOpts, nvsandboxutils.WithLibraryPath(libNvidiaSandboxutilsPath))
|
|
||||||
// }
|
|
||||||
// l.nvsandboxutilslib = nvsandboxutils.New(nvsandboxutilsOpts...)
|
|
||||||
// }
|
|
||||||
if l.devicelib == nil {
|
if l.devicelib == nil {
|
||||||
l.devicelib = device.New(l.nvmllib)
|
l.devicelib = device.New(l.nvmllib)
|
||||||
}
|
}
|
||||||
@ -231,3 +214,23 @@ func (l *nvcdilib) getCudaVersionNvsandboxutils() (string, error) {
|
|||||||
}
|
}
|
||||||
return version, nil
|
return version, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// getNvsandboxUtilsLib returns the nvsandboxutilslib to use for CDI spec
|
||||||
|
// generation.
|
||||||
|
func (l *nvcdilib) getNvsandboxUtilsLib() nvsandboxutils.Interface {
|
||||||
|
if l.nvsandboxutilslib != nil {
|
||||||
|
return l.nvsandboxutilslib
|
||||||
|
}
|
||||||
|
|
||||||
|
var nvsandboxutilsOpts []nvsandboxutils.LibraryOption
|
||||||
|
// Set the library path for libnvidia-sandboxutils
|
||||||
|
candidates, err := l.driver.Libraries().Locate("libnvidia-sandboxutils.so.1")
|
||||||
|
if err != nil {
|
||||||
|
l.logger.Warningf("Ignoring error in locating libnvidia-sandboxutils.so.1: %v", err)
|
||||||
|
} else {
|
||||||
|
libNvidiaSandboxutilsPath := candidates[0]
|
||||||
|
l.logger.Infof("Using %v", libNvidiaSandboxutilsPath)
|
||||||
|
nvsandboxutilsOpts = append(nvsandboxutilsOpts, nvsandboxutils.WithLibraryPath(libNvidiaSandboxutilsPath))
|
||||||
|
}
|
||||||
|
return nvsandboxutils.New(nvsandboxutilsOpts...)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user