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

Feature Request: Ability to provide wildcard for devices in --device option #2968

Open
aws-vrnatham opened this issue Feb 9, 2021 · 8 comments

Comments

@aws-vrnatham
Copy link

Description
If we have devices /dev/xyz1 to /dev/xyz10, currently to bind mount all these devices we have to use --device=/dev/xyz1 --device=/dev/xyz2 ...... It would be good to have a wildcard like --device=/dev/xyz* that lets all the devices show up in the container.

@thaJeztah
Copy link
Member

Would the --device-group-rule option work for your use-case? see moby/moby#22563 / moby/moby#30679

@aws-vrnatham
Copy link
Author

It would not work because we need all the devices to be there in the container at the start so that the app that is started as has access to all the devices.

@micwade-aws
Copy link

@thaJeztah - To accomplish the desired functionality today, we have to use an environment variable (VISIBLE_DEVICES=ALL) and an OCI hook to ensure "all" devices get mounted in the container. If docker supported a wildcard, we'd no longer have a reason to keep producing our oci-hook. A big win for ourselves and customers, but potentially a win for all teams using multiple devices in containers, e.g. GPU consumers.

@aws-vrnatham
Copy link
Author

@thaJeztah - Have created a draft pull request. Please do let us know if we should make this change in the client side as was done in the PR or if we should move the functionality to the server side.

#2978

@f-michaut
Copy link

I was going to open a similar feature request, would love to see this pull request accepted !

@thaJeztah
Copy link
Member

This needs to be implemented on the daemon-side, as docker uses a client-server architecture, so the CLI may not be running on the same host as the daemon is running (let me leave the comment on the PR as well)

aws-vrnatham added a commit to aws-vrnatham/engine that referenced this issue Dec 9, 2021
This takes care of the [issue](docker/cli#2968)
from the server side

Signed-off-by: Venky Natham <[email protected]>
@aws-vrnatham
Copy link
Author

Thanks. Have updated the change in the cli side and also created a PR in the engine side.

@Bluscream
Copy link

Any news on this?

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

5 participants