mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-03-09 22:00:31 +00:00
Disable nvsandboxutils in nvcdi API
Repeated calls to nvsandboxutils.Init and Shutdown are causing segmentation violations. Here we disabled nvsandbox utils unless explicitly specified. Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
65b575fa96
commit
2b493e39e7
@ -99,19 +99,22 @@ func New(opts ...Option) (Interface, error) {
|
||||
}
|
||||
l.nvmllib = nvml.New(nvmlOpts...)
|
||||
}
|
||||
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...)
|
||||
}
|
||||
// TODO: Repeated calls to nvsandboxutils.Init and Shutdown are causing
|
||||
// segmentation violations. Here we disabled nvsandbox utils unless explicitly
|
||||
// specified.
|
||||
// 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 {
|
||||
l.devicelib = device.New(l.nvmllib)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user