Skip to content

Commit 75ef43f

Browse files
committed
Pass driver root to nvinfo.New in device plugin main
The `nvinfo` instance passed to `validateFlags` needs to have the driver root path, otherwise the `HasNvml` call will fail (`libnvidia-ml.so.1` won't be found). This will in turn cause `validateFlags` to error out if `AnyCDIEnabled` is true. Signed-off-by: Jean-Francois Roy <[email protected]>
1 parent 8e66a4a commit 75ef43f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

cmd/nvidia-device-plugin/main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ func startPlugins(c *cli.Context, o *options) ([]plugin.Interface, bool, error)
333333
)
334334
devicelib := device.New(nvmllib)
335335
infolib := nvinfo.New(
336+
nvinfo.WithRoot(string(driverRoot)),
336337
nvinfo.WithNvmlLib(nvmllib),
337338
nvinfo.WithDeviceLib(devicelib),
338339
)

0 commit comments

Comments
 (0)