@@ -2024,22 +2024,36 @@ message NodePrepareResourceResponse {
2024
2024
}
2025
2025
```
2026
2026
2027
- CRI protocol MUST be extended for this purpose, e.g. list of CDI
2028
- device ids should be added to the CRI Device structure:
2027
+ CRI protocol MUST be extended for this purpose:
2029
2028
2029
+ * CDIDevice structure should be added to the CRI specification
2030
2030
``` protobuf
2031
- // Device specifies a host device to mount into a container.
2032
- message Device {
2033
- ...
2034
- string permissions = 3;
2035
- // Set of fully qualified CDI device names in the following
2036
- // format: <kind>=<name>,
2037
- // where
2038
- // kind (string) is a device vendor identifier
2039
- // name (string) is a device name
2031
+ // CDIDevice specifies a CDI device information.
2032
+ message CDIDevice {
2033
+ // Fully qualified CDI device name
2040
2034
// for example: vendor.com/gpu=gpudevice1
2041
- // see more details in the [CDI specification](https://github.com/container-orchestrated-devices/container-device-interface/blob/master/SPEC.md)
2042
- repeated string cdi_device = 4;
2035
+ // see more details in the CDI specification:
2036
+ // https://github.com/container-orchestrated-devices/container-device-interface/blob/main/SPEC.md
2037
+ string name = 1;
2038
+ }
2039
+ ```
2040
+ * CDI devices should be added to the ContainerConfig structure:
2041
+ ``` protobuf
2042
+ // ContainerConfig holds all the required and optional fields for creating a
2043
+ // container.
2044
+ message ContainerConfig {
2045
+ // Metadata of the container. This information will uniquely identify the
2046
+ // container, and the runtime should leverage this to ensure correct
2047
+ // operation. The runtime may also use this information to improve UX, such
2048
+ // as by constructing a readable name.
2049
+ ContainerMetadata metadata = 1 ;
2050
+ // Image to use.
2051
+ ImageSpec image = 2;
2052
+ // Command to execute (i.e., entrypoint for docker)
2053
+ repeated string command = 3;
2054
+ ...
2055
+ // CDI devices for the container.
2056
+ repeated CDIDevice cdi_devices = 17;
2043
2057
}
2044
2058
```
2045
2059
0 commit comments