Getting hardware encoding working needs official solution

Here is my docker compose, which successfully allows me to do hardware encoding:

version: '3.7'

services:
  plex:
    image: plexinc/pms-docker:plexpass
    container_name: plex
    restart: unless-stopped
    network_mode: host
    devices:
      - /dev/dri/renderD128
    entrypoint: /bin/sh -c "chmod o+rw /dev/dri/renderD128 && usermod -aG video plex && /init"
    volumes:
      - ./plex/config:/config
      - plex-transcode:/transcode
      - /media/plex:/data
    environment:
      - TZ=America/Chicago
      - PLEX_CLAIM=claim-ABCD
      - PLEX_UID=$UID
      - PLEX_GID=$GID

I had to override the entrypoint for the script so that permissions could be adjusted for access to the render device. Is there an official solution for this? Nothing in the documentation mentions anything about this. Would it be fair to have the built-in entry point do this instead?

Thanks for sharing :slight_smile:

@gbooker02: Can you add an ENV for the device name and make use of it in an entrypoint script to perform those steps if /dev/dri/${device name} exist?

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