CDI support#4056
Conversation
4a22da3 to
a5c3952
Compare
|
I was also looking at moby/moby#45134 to register CDI device drivers. I think we need to add a new attribute in our TOML config to set the CDI specification directories otherwise CDI request will fail. |
|
@crazy-max I have not yet had a look at these changes in detail. From my understanding Note that from the NVIDIA side, this may have unintended consequences of producing container images that require a specific driver version to work correctly. The intent of the CDI device specifications that are used when running a container is to ensure that drivers that match the kernel mode driver on the host are injected dynamically, allowing applications that are built against the driver API to function as expected. |
|
You are correct that BuildKit is used to build containers, and with these changes, the goal is to make devices available at build time. This would allow users to mount specific devices when building container images. Regarding the unintended consequences of producing container images that require a specific driver version, it sound expected and we might put in place some kind of capabilities. Intention is to provide more flexibility and convenience to users during the container building process. However, I understand the importance of keeping portability across environments. If you have any further suggestions or concerns, please don't hesitate to let us know. We aim to create a seamless experience for users while ensuring compatibility and reliability across different setups. |
|
any update on this? @crazy-max @elezar so far any place I see I need to disable buildkit to make use of building NVIDIA related components. I would rather allow a very limited experience with tons of caveats than removing buildkit to build. |
elezar
left a comment
There was a problem hiding this comment.
I have left some comments.
It might be good to call out in the PR description how this option is used and protected by a feature flag / capabilities. Documentation changes for the option that call out the caveats would also be appreciated.
|
Hi @georgettica, thanks for your response. I'm a product manager at Docker, and this is something we are actively exploring at the moment, with the aim of getting a timeframe for the roadmap. Do you have details on what would be an acceptable limited experience for you? I would be interested to chat about your use case if you prefer? https://calendly.com/colin-hemmings-dock/buildkit-chat |
928f5aa to
6adbc2e
Compare
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
| defer c.Close() | ||
|
|
||
| require.NoError(t, os.WriteFile(filepath.Join(sb.CDISpecDir(), "vendor1-device.yaml"), []byte(` | ||
| cdiVersion: "0.6.0" |
There was a problem hiding this comment.
Annotations are supported since 0.6.0: https://github.com/cncf-tags/container-device-interface/blob/main/SPEC.md#released-versions
There was a problem hiding this comment.
It should be documented.
10de940 to
5065ab9
Compare
| require.Contains(t, strings.TrimSpace(string(dt)), `BAR=injected`) | ||
| require.NotContains(t, strings.TrimSpace(string(dt)), `FOO=injected`) | ||
| require.NotContains(t, strings.TrimSpace(string(dt)), `BAZ=injected`) | ||
| require.NotContains(t, strings.TrimSpace(string(dt)), `QUX=injected`) |
There was a problem hiding this comment.
Takes first in lexicographical order
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
tonistiigi
left a comment
There was a problem hiding this comment.
Some more updates are needed before GA, but lets get this in for testing in RC.
| @@ -0,0 +1,88 @@ | |||
| //go:build !windows | |||
There was a problem hiding this comment.
This shouldn't need build tags as the contrib importer is not included by default and already behind a build tag.
There was a problem hiding this comment.
Ah, linter runs for all package+arch combinations.
|
Needs docs follow-up in dockerfile reference for |
related to #1436
Adds initial support for specifying fully-qualified CDI device names.