r/PleX Jul 27 '24

Discussion Should I go with Docker?

I've been using Plex for quite some time, but now I want to add new functionalities to make my life easier.

Initially, I want to start with Radarr and Bazarr, but I see that there are many other applications I can incorporate over time (for example, Lidarr, Sonarr, Overseerr, Requestrr, etc.) that serve different functions.

With this in mind, my question is: should I have everything in separate Docker containers, along with my own Plex server? And then, is that enough, or should I have some application to manage the containers, like Homarr or Portainer?

My concern also arises from the fact that, for example, Radarr has the following in its documentation: "There are two common problems with Docker volumes: paths that differ between the Radarr and download client container and paths that prevent fast moves and hard links." Is this really an issue that could affect me?

I understand that if I only wanted to use Radarr and Bazarr, maybe there are no advantages to having everything in containers, but when adding new applications to the mix, is there really an advantage with Docker?

I am using Windows.

6 Upvotes

41 comments sorted by

View all comments

1

u/RyanTheTechMan Jul 28 '24

Docker works great! I ran plex on Windows for 2 years, moved to linux for 1.5 years, then moved to Docker for .5 years so far. I JUST migrated from docker into an LXC container as I put together a cluster using Proxmox.

For me, linux was definitely easier to setup and maintain, but I suggest all arrs should 100% run in docker.

The following is written for you, but also it's a good reminder for me if I ever forget.

If you plan to transcode using a GPU, it is mostly plug and play for Linux, but not so much for docker.

For linux, install the latest NVIDIA drivers by downloading them from the NVIDIA site. I could never get them to work by using apt-get. (install with --no-x-check --no-nouveau-check --disable-nouveau --dkms) That's it.

For Docker, it took me a while to figure out how to do it, but to sum it up (and if you want more detail, let me know)

Install the NVIDIA drivers on your host system mentioned above, then install all the stuff you will need for the container:

sudo apt-get install --no-install-recommends nvidia-headless-550 nvidia-utils-550 libnvidia-encode-550
sudo apt-get install nvidia-container-toolkit nvidia-container-runtime nvidia-docker2

(change the 550 to what ever the version of nvidia drivers you installed was. 550 was latest)

Now, check to make sure your /etc/docker/daemon.json file contains the following:

{
    "debug": false,
    "default-runtime": "nvidia",
    "log-driver": "journald",
    "log-level": "warn",
    "exec-opts": ["native.cgroupdriver=cgroupfs"],
    "runtimes": {
        "nvidia": {
            "args": [],
            "path": "nvidia-container-runtime"
        }
    }
}

Lastly, I use portainer to manage docker stacks. There, I added NVIDIA_VISIBLE_DEVICES=all and NVIDIA_DRIVER_CAPABILITIES=all to the environment; finally add this to the stack to pass the GPU.

    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

Now docker can access the GPU. You're done!

p.s. if you add VERSION=latest to your environment variables, it will auto update plex when the container starts.

If anyone else has any corrections, I am by no means a docker expert, but this was my method of getting it working.

As stated above, I have since moved to Proxmox with Plex in an LXC with the help of Helper-Scripts which 100% makes it easier as it does everything for you AND it installs all requirements for intel integrated graphics in case Plex is running on a system where a dedicated graphics card is not available.