|
6 | 6 |
|
7 | 7 | CDI (Container Device Interface), is a [specification](SPEC.md), for container runtimes, to support third party devices.
|
8 | 8 |
|
| 9 | +It introduces an abstract notion of a device as a resource. Such devices are uniquely specified by a fully-qualified name that is constructed from a vendor ID, a device class, and a name that is unique per vendor ID-device class pair. |
| 10 | + |
| 11 | +``` |
| 12 | +vendor.com/class=unique_name |
| 13 | +``` |
| 14 | + |
| 15 | +The combination of vendor ID and device class (`vendor.com/class` in the above example) is referred to as the device kind. |
| 16 | + |
9 | 17 | CDI concerns itself only with enabling container to be device aware. Areas like resource management are explicitly left out of CDI (and is expected to be handled by the orchestrator). Because of this focus, the CDI specification is simple to implement and allows great flexibility to runtimes and orchestrators.
|
10 | 18 |
|
11 | 19 | Note: The CDI model is based on the Container Networking Interface (CNI) model and specification.
|
@@ -107,22 +115,18 @@ $ cat > /etc/cdi/vendor.json <<EOF
|
107 | 115 | }
|
108 | 116 | }
|
109 | 117 | EOF
|
| 118 | +``` |
110 | 119 |
|
111 |
| -# CLI examples below |
112 |
| - |
113 |
| -# Verbose |
114 |
| -$ docker/podman run --device vendor.com/device=myDevice --device vendor.com/device=myDevice2 ... |
115 |
| - |
116 |
| -# Less verbose, through infering the vendor from the device name |
117 |
| -$ docker/podman run --device myDevice ... |
| 120 | +Assuming this specification has been generated and is available in either `/etc/cdi` or `/var/run/cdi` (or whereever a CDI-enabled consumer is configured to read CDI specifications from), the devices can be accessed through their fully-qualified device names. |
118 | 121 |
|
119 |
| -# Special case |
120 |
| -$ docker/podman run --device vendor.com/device=all ... |
| 122 | +For example, in the case of `podman` the CLI for accessing the device would be: |
| 123 | +``` |
| 124 | +$ podman run --device vendor.com/device=myDevice ... |
121 | 125 | ```
|
122 | 126 |
|
123 | 127 | ## Issues and Contributing
|
124 | 128 |
|
125 | 129 | [Checkout the Contributing document!](CONTRIBUTING.md)
|
126 | 130 |
|
127 |
| -* Please let us know by [filing a new issue](https://github.com/RenaudWasTaken/cdi/issues/new) |
| 131 | +* Please let us know by [filing a new issue](https://github.com/container-orchestrated-devices/container-device-interface/issues/new) |
128 | 132 | * You can contribute by opening a [pull request](https://help.github.com/articles/using-pull-requests/)
|
0 commit comments