mnestor / docker-swarm-devices

9 stars 2 forks source link

can't create /docker/[...]/devices.allow: nonexistent directory #3

Open YoshiWalsh opened 2 years ago

YoshiWalsh commented 2 years ago

Hi, thanks for writing this, it looks like just the thing I need to be able to use QuickSync with Plex in Swarm mode. I'm encountering an error:

Starting event listener container
Unable to find image 'docker:latest' locally
latest: Pulling from library/docker
59bf1c3509f3: Already exists
1ea03e1895df: Already exists
1ff98835b055: Already exists
a3f2dd7b7d65: Already exists
d182b62d4a35: Already exists
d7a57db2abd7: Already exists
73490af52bd3: Already exists
Digest: sha256:a729cce205a05b0b86dc8dca87823efaffc3f74979fe7dc86a707c2fbf631b61
Status: Downloaded newer image for docker:latest
Listening for startup events that have a label of 'volume.device'
sh: can't create /docker/ae154fbf1b841d7f447c64296e69dd1b95cc392342f456a7a2a8a02c6d61173b/devices.allow: nonexistent directory
Setting permissions (c 0:0 rwm) for ae154fbf1b841d7f447c64296e69dd1b95cc392342f456a7a2a8a02c6d61173b to device (/dev/dri)

Plex is not detecting QuickSync, I think this error must be preventing it from working. I'd really appreciate any help you can provide.

I looked at the contents of the /sys/fs/cgroup/devices/docker directory and it does not contain any subdirectories.

mnestor commented 2 years ago

That directory would only exist when your plex container is running. Creating the devices.allow would give the container permissions to mount your gpu then.

YoshiWalsh commented 2 years ago

The container was definitely running, but the directory did not exist.

I ended up just taking Docker out of swarm mode.

mnestor commented 2 years ago

Yeah, that is what I ended up doing too. I think you should even be able to do caps for the plex container now though so this wouldn't even be needed if you wanted to stay in swarm.

Sorry!