Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does docker support CDI? #84

Closed
yeahdongcn opened this issue Oct 17, 2022 · 7 comments
Closed

Does docker support CDI? #84

yeahdongcn opened this issue Oct 17, 2022 · 7 comments

Comments

@yeahdongcn
Copy link

I noticed docker is mentioned in the Examples section, just wondering whether docker supports CDI, and are there any extra configurations on how to set up docker?

# CLI examples below

# Verbose
$ docker/podman run --device vendor.com/device=myDevice --device vendor.com/device=myDevice2 ...

# Less verbose, through infering the vendor from the device name
$ docker/podman run --device myDevice ...

# Special case
$ docker/podman run --device vendor.com/device=all ...
@elezar
Copy link
Contributor

elezar commented Oct 26, 2022

@yeahdongcn docker does not currently support CDI. This is something that we have been discussing, but have not had the opportunity to look at it yet.

Here we see a similar approach to podman being followed where the --device flag is extended to check for fully-qualified CDI device names and the apropriate modifications made to the OCI spec. Note that this would also have to disable the --gpus flag (and possibly even mark this as deprecated).

Note that there are other docker use cases that are not covered by this, including docker-compose and one would have to work with the community to add CDI support there too.

@yeahdongcn
Copy link
Author

@elezar Thanks for the explanation. Is there an open issue for docker to integrate with CDI?

@elezar
Copy link
Contributor

elezar commented Jan 24, 2023

We have created docker/cli#3864 to track the work required on the docker front. Thre is not yet a timeline on this.

@elezar
Copy link
Contributor

elezar commented Mar 15, 2023

We have created moby/moby#45134 and docker/cli#4084 to add CDI support to moby and the Docker CLI.

@bart0sh
Copy link
Contributor

bart0sh commented Sep 25, 2023

@elezar both above mentioned PRs have been merged. Should we close this issue?

Copy link

This issue is stale because it has been open 90 days with no activity. This issue will be closed in 30 days unless new comments are made or the stale label is removed.

@elezar
Copy link
Contributor

elezar commented Jun 7, 2024

Closing this issue as completed. CDI is available as an opt-in feature in Docker as of Docker 25.

@elezar elezar closed this as completed Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants