What do I need to do to setup transcoding properly from Docker container - Linux

Server Version# 1.41.2.9200
Player Version#:

I just setup Plex on a mini PC (Core i5 12450H) running Fedora Workstation 41, using Docker compose. I’m using the linuxserver/plex:latest image, and I set it up with pretty much the basic compose file from Docker hub.

services:
  plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    network_mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
      - VERSION=docker
      - PLEX_CLAIM= *******************
    volumes:
      - /compose/plex/library:/config
      - /media/:/media
    restart: unless-stopped

I had been running Plex on an old file server I built 10 years ago, but it couldn’t do transcoding because of the CPU and lack of GPU. It was a direct service install and not any sort of container. This is my first go at Docker.

What I need to know is what more do I need to do to the docker compose file to enable hardware transcoding vi the 12th gen Core i5 processor?

I have Plex pass, and the code is in the config.

To make the GPU visible inside the container,

  1. You’ll need to pass the device node:
--device=/dev/dri:/dev/dri
  1. Next, you’ll need to make sure the UID you run the container as is a member of the group which owns render
    – This is how Plex is configured. It looks at who owns the GPU then adds itself to that group
[chuck@lizum docker.2007]$ ls -la /dev/dri
total 0
drwxr-xr-x   3 root root        140 Nov  8 18:21 ./
drwxr-xr-x  22 root root       5800 Nov 19 13:28 ../
drwxr-xr-x   2 root root        140 Nov 19 13:28 by-path/
crw-rw----+  1 root render 226,   1 Nov 19 13:28 card1
crw-rw----+  1 root render 226,   2 Nov 19 13:28 card2
crw-rw----+  1 root render 226, 128 Nov 19 13:28 renderD128
crw-rw----+  1 root render 226, 129 Nov 19 13:28 renderD129
[chuck@lizum docker.2008]$ groups plex
plex : plex render
[chuck@lizum docker.2009]$

This tells me that the UID I run this container as must be a member of group render

[chuck@lizum docker.2010]$ grep render /etc/group
render:x:110:chuck,plex
[chuck@lizum docker.2011]$

One of several detailed references is here:

@ChuckPa Chuckpa, much appreciated.

Does it matter where I put that device line in the compose file?

I do not have a plex user acount. Do I need to create for the container?

tmo**********@fedora:/compose$ ls -la /dev/dri
total 0
drwxr-xr-x.  3 root root        100 Nov 18 16:58 .
drwxr-xr-x. 20 root root       4180 Nov 19 16:31 ..
drwxr-xr-x.  2 root root         80 Nov 18 16:58 by-path
crw-rw----+  1 root video  226,   1 Nov 19 18:04 card1
crw-rw-rw-.  1 root render 226, 128 Nov 18 16:58 renderD128
tmo**********@fedora:/compose$ groups plex
groups: ‘plex’: no such user
tmo**********@fedora:/compose$ grep render /etc/group
render:x:105:

Lastly, since I’m using the integrated graphics and not a dedicated GPU, is what I’m trying to do different than the Nivdia refernce you provided?

Nevermind, I found an example. I created a devices heading.

devices:
  - /dev/dri:/dev/dri # For hardware transcoding

If you’re running PMS entirely in Docker,

The UID you’re running as (which should be a valid ID) should be added to groups video and render.

The Linux installer creates normal user “plex” (just like any other user id)
It then adds render and video.

This last step is what you want to replicate for your container.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.