You know I’m going to say this, so apologize in advance.
There are times for Docker and times for native apps.
This is not a case for Docker
- The native app exists
- The native app installer handles all the configuration for you.
- /etc/systemd/system/plexmediaserver.service.d/override.conf allows you to move / configure to your site needs.
There’s even documentation how to do it
lol
Then, to pass the GPU to the native app in the LXC container, I run a little script.
#
# Argument #1 is LXC container to add
[ -z "$1" ] && "Error: missing container name" && exit 1
if [ "$(lxc list | grep "$1")" == "" ]; then
echo "Error: Unknown container name '$1'"
exit 2
fi
# Make certain /dev/dri/renderD128 exists
if [ ! -e /dev/dri/renderD128 ]; then
echo Error: This host does not have hardware transcoding ability /dev/dri/renderD128
exit 3
fi
Gid="$(stat -c %g /dev/dri/renderD128)"
# Add it
lxc config device add "$1" gpu gpu gid=$Gid