Skip to content

Extend spec to allow for "meta" devices. #71

Open
@elezar

Description

@elezar

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 requires list in addition to to the container edits specified
  • ensure that there are no cycles in the requires chain.

Open questions:

  • Should the entry in requires be a fully-qualified name?
  • Should we indicate that the entry in the requires list 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions