mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-28 15:03:23 +00:00
Support device name strategies for Tegra devices
This change generates CDI specifications for Tegra devices with the nvidia.com/gpu=0 name by default. The type-index nameing strategy is also supported and will generate a device with the name nvidia.com/gpu=gpu0. The uuid naming strategy will raise an error if selected. Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
f07a0585fc
commit
9f46c34587
@ -53,8 +53,13 @@ func (l *csvlib) GetAllDeviceSpecs() ([]specs.Device, error) {
|
||||
return nil, fmt.Errorf("failed to create container edits for CSV files: %v", err)
|
||||
}
|
||||
|
||||
name, err := l.deviceNamer.GetDeviceName(0, uuidUnsupported{})
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get device name: %v", err)
|
||||
}
|
||||
|
||||
deviceSpec := specs.Device{
|
||||
Name: "all",
|
||||
Name: name,
|
||||
ContainerEdits: *e.ContainerEdits,
|
||||
}
|
||||
return []specs.Device{deviceSpec}, nil
|
||||
|
Loading…
Reference in New Issue
Block a user