docker-compose and hardware transcoding
slochewie opened this issue · comments
If you attempt to add a devices section for hardware transcoding for Plex and try to do a "docker-compose up -d plex" it'll throw a bunch of python errors. Fix is to comment out the leading "version" line and use "docker compose up -d plex" instead.
Apparently a recentish docker update has deprecated the need for the docker-compose scrypt. Now the docker command has a compose option built in and also removed the need for "version" in the compose files.
I'm happy to change the docker-compose
instructions to just use docker compose
and maybe we can reduce the compose file version to just version: '3'
?
Would you like to open a PR with the changes?
Sorry for the delay. Trying to recreate the behavior, I’ve noticed more.
I’m using a recent clone of this project. Not the old fork I did a long time ago.
I commented out services wouldn’t use, added Tautulli, Portainer, Heimdall. Everything was working fine until I added to the plex section the following:
devices: - "/dev/dri:/dev/dri"
What I’ve noticed now, regardless if version 3 or 3.7 when using say “docker-compose up -d plex” or “ docker-compose up -d sonarr” it throws the python parser errors. But also what happens is a new container is actually created, but the name becomes something like “056025176f62_mediaserver_plex_1” but the container doesn’t come up,it exits. If I delete that container and do “docker-compose up -d plex” again, no python parser errors occur and the container is recreated as “mediaserver_plex_1” and it’s all working correctly again. So I guess the parser errors only occur when doing “docker-compose up -d” and that replaces an already existing container.
if I simply comment out the “version: "3.7" line in the docker-compose files and use “docker compose up -d plex” it always works as expected.
It’s weird. The server this issue occurs on is brand new, running Ubuntu 23.10, with latest version of Docker.
Python error starts with ERROR: for mediaserver-plex-1 'ContainerConfig'
Quick Google for ContainerConfig immediately led to this very recent link where others seemingly have this issue with on Ubuntu and “docker-compose” vs “docker compose” and they reached the same workaround I’m using.
I guess this can be closed. Does make me wonder if docker-compose will be obsoleted for docker compose….
Yes, I suspect docker compose is preferred over docker-compose going forward. I personally never use the latter anymore.
Would you be interested in contributing a PR to the README with the changes?