Unable to add devices with "service create" #24865
Labels
area/swarm
kind/feature
Functionality or other elements that the project doesn't currently have. Features are new and shiny
Currently, it's not possible to add devices with
docker service create
, there is no equivalent fordocker run --device=/dev/foo
.I'm an author of nvidia-docker with @3XX0 and we need to add devices files (the GPUs) and volumes to the starting containers in order to enable GPU apps as services.
See the discussion here: #23917 (comment) (summarized below).
We figured out how to add a volume provided by a volume plugin:
But there is no solution for devices, @cpuguy83 and @justincormack suggested using
--mount type=bind
. But it doesn't seem to work, it's probably like doing a mknod but without the proper device cgroup whitelisting.It's probably equivalent to this:
Whereas the following works (invalid arg is normal, but no permission error):
The text was updated successfully, but these errors were encountered: