- 
                Notifications
    
You must be signed in to change notification settings  - Fork 47
 
Open
Labels
Description
One of the use cases originally proposed for CDI was use of meta devices such as "all". Since these are generally vendor-specific supporting these in the API is not feasible. The proposal is to add a requires field to the device specification to allow for devices to be grouped. (See the example spec below).
The API would have to be extended to:
- apply the edits for all devices in the 
requireslist in addition to to the container edits specified - ensure that there are no cycles in the requires chain.
 
Open questions:
- Should the entry in 
requiresbe a fully-qualified name? - Should we indicate that the entry in the 
requireslist is a device explicitly? 
cdiVersion: 0.5.0
kind: nvidia.com/gpu
devices:
- name: all
  requires:
    - GPU-edfee158-11c1-52b8-0517-92f30e7fac88
    - GPU-f22fb098-d1b3-3806-2655-ba25f02229c1
- name: GPU-edfee158-11c1-52b8-0517-92f30e7fac88
  containerEdits:
    mounts:
    - containerPath: /var/run/nvidia-container-devices/GPU-edfee158-11c1-52b8-0517-92f30e7fac88
      hostPath: /dev/null
      options:
      - ro
- name: GPU-f22fb098-d1b3-3806-2655-ba25f02229c1
  containerEdits:
    mounts:
    - containerPath: /var/run/nvidia-container-devices/GPU-f22fb098-d1b3-3806-2655-ba25f02229c1
      hostPath: /dev/null
      options:
      - ro
containerEdits:
  hooks:
  - args:
    - nvidia-container-runtime-hook
    - prestart
    hookName: prestart
    path: nvidia-container-runtime-hook