mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-25 13:35:00 +00:00
Update go-nvlib with new constructor
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
bcf3a70174
commit
c4d3b13ae2
@ -71,8 +71,8 @@ func newAllPossible(logger logger.Interface, driverRoot string) (nodeLister, err
|
|||||||
|
|
||||||
// DeviceNodes returns a list of all possible device nodes for NVIDIA GPUs, control devices, and capability devices.
|
// DeviceNodes returns a list of all possible device nodes for NVIDIA GPUs, control devices, and capability devices.
|
||||||
func (m allPossible) DeviceNodes() ([]deviceNode, error) {
|
func (m allPossible) DeviceNodes() ([]deviceNode, error) {
|
||||||
gpus, err := nvpci.NewFrom(
|
gpus, err := nvpci.New(
|
||||||
filepath.Join(m.driverRoot, nvpci.PCIDevicesRoot),
|
nvpci.WithPCIDevicesRoot(filepath.Join(m.driverRoot, nvpci.PCIDevicesRoot)),
|
||||||
).GetGPUs()
|
).GetGPUs()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("failed to get GPU information: %v", err)
|
return nil, fmt.Errorf("failed to get GPU information: %v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user