mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-06-26 18:18:24 +00:00
nvsandboxutils: Add usage of GetGpuResource and GetFileContent APIs
This change adds a new discoverer for Sandboxutils to report the file system paths and associated symbolic links using GetGpuResource and GetFileContent APIs. Both GPU and MIG devices are supported. If the Sandboxutils discoverer fails, the NVML discoverer is used to report the file system information. Signed-off-by: Evan Lezar <elezar@nvidia.com> Signed-off-by: Huy Nguyen <huyn@nvidia.com> Signed-off-by: Sananya Majumder <sananyam@nvidia.com>
This commit is contained in:
@@ -72,6 +72,7 @@ func (l *nvmllib) newFullGPUDiscoverer(d device.Device) (discover.Discover, erro
|
||||
dgpu.WithDevRoot(l.devRoot),
|
||||
dgpu.WithLogger(l.logger),
|
||||
dgpu.WithNVIDIACDIHookPath(l.nvidiaCDIHookPath),
|
||||
dgpu.WithNvsandboxuitilsLib(l.nvsandboxutilslib),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create device discoverer: %v", err)
|
||||
|
||||
@@ -55,6 +55,7 @@ func (l *nvmllib) GetMIGDeviceEdits(parent device.Device, mig device.MigDevice)
|
||||
dgpu.WithDevRoot(l.devRoot),
|
||||
dgpu.WithLogger(l.logger),
|
||||
dgpu.WithNVIDIACDIHookPath(l.nvidiaCDIHookPath),
|
||||
dgpu.WithNvsandboxuitilsLib(l.nvsandboxutilslib),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create device discoverer: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user