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...)
|
l.nvmllib = nvml.New(nvmlOpts...)
|
||||||
}
|
}
|
||||||
if l.nvsandboxutilslib == nil {
|
// TODO: Repeated calls to nvsandboxutils.Init and Shutdown are causing
|
||||||
var nvsandboxutilsOpts []nvsandboxutils.LibraryOption
|
// segmentation violations. Here we disabled nvsandbox utils unless explicitly
|
||||||
// Set the library path for libnvidia-sandboxutils
|
// specified.
|
||||||
candidates, err := l.driver.Libraries().Locate("libnvidia-sandboxutils.so.1")
|
// if l.nvsandboxutilslib == nil {
|
||||||
if err != nil {
|
// var nvsandboxutilsOpts []nvsandboxutils.LibraryOption
|
||||||
l.logger.Warningf("Ignoring error in locating libnvidia-sandboxutils.so.1: %v", err)
|
// // Set the library path for libnvidia-sandboxutils
|
||||||
} else {
|
// candidates, err := l.driver.Libraries().Locate("libnvidia-sandboxutils.so.1")
|
||||||
libNvidiaSandboxutilsPath := candidates[0]
|
// if err != nil {
|
||||||
l.logger.Infof("Using %v", libNvidiaSandboxutilsPath)
|
// l.logger.Warningf("Ignoring error in locating libnvidia-sandboxutils.so.1: %v", err)
|
||||||
nvsandboxutilsOpts = append(nvsandboxutilsOpts, nvsandboxutils.WithLibraryPath(libNvidiaSandboxutilsPath))
|
// } else {
|
||||||
}
|
// libNvidiaSandboxutilsPath := candidates[0]
|
||||||
l.nvsandboxutilslib = nvsandboxutils.New(nvsandboxutilsOpts...)
|
// 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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user