container-device-interface icon indicating copy to clipboard operation
container-device-interface copied to clipboard

[Feature Request] Add `Aliases` in Device spec

Open yeahdongcn opened this issue 3 years ago • 8 comments

I'm using Nvidia Container Toolkit to provision GPU-capable containers for AI training. After I shifted to CDI, I could only use the index of the GPU devices rather than UUID. So I think it would be good if Aliases (or something else) could be introduced into specs.Device. As an end user, then I can specify both index and UUID. From Nvidia Container Toolkit perspective, the user experiences will become more consistent.

@@ -17,6 +17,7 @@ type Spec struct {
 // Device is a "Device" a container runtime can add to a container
 type Device struct {
        Name           string         `json:"name"`
+       Aliases        []string       `json:"aliases"`
        ContainerEdits ContainerEdits `json:"containerEdits"`
 }

yeahdongcn avatar Oct 24 '22 07:10 yeahdongcn