diff --git a/Dockerfile b/Dockerfile index fa7b9c4..ca9d0d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,6 @@ LABEL maintainer="sparklyballs, thelamer" #Add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility" -ENV NVIDIA_DRIVER_CAPABILITIES="all" # global environment settings ENV DEBIAN_FRONTEND="noninteractive" \ @@ -17,9 +16,10 @@ PLEX_DOWNLOAD="https://downloads.plex.tv/plex-media-server" \ PLEX_INSTALL="https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu" \ PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" \ PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \ -PLEX_MEDIA_SERVER_INFO_DEVICE=docker \ PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \ -PLEX_MEDIA_SERVER_USER=abc +PLEX_MEDIA_SERVER_USER="abc" \ +PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \ +PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)" RUN \ echo "**** install runtime packages ****" && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 6c97e3c..3aa48c8 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -14,9 +14,10 @@ LABEL maintainer="sparklyballs, thelamer" ENV DEBIAN_FRONTEND="noninteractive" \ PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" \ PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \ -PLEX_MEDIA_SERVER_INFO_DEVICE=docker \ PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \ -PLEX_MEDIA_SERVER_USER=abc +PLEX_MEDIA_SERVER_USER="abc" \ +PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \ +PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)" RUN \ echo "**** install runtime packages ****" && \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index b2ff444..1e2a6dc 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -14,9 +14,10 @@ LABEL maintainer="sparklyballs, thelamer" ENV DEBIAN_FRONTEND="noninteractive" \ PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" \ PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \ -PLEX_MEDIA_SERVER_INFO_DEVICE=docker \ PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \ -PLEX_MEDIA_SERVER_USER=abc +PLEX_MEDIA_SERVER_USER="abc" \ +PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \ +PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)" RUN \ echo "**** install runtime packages ****" && \ diff --git a/README.md b/README.md index 4cee4fb..4984db9 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,7 @@ In this instance `PUID=1001` and `PGID=1001`, to find yours use `id user` as bel uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup) ``` +   ## Application Setup @@ -163,17 +164,17 @@ Valid settings for VERSION are:- + **`public`**: will update plexpass users to the latest public version, useful for plexpass users that don't want to be on the bleeding edge but still want the latest public updates. + **``**: will select a specific version (eg 0.9.12.4.1192-9a47d21) of plex to install, note you cannot use this to access plexpass versions if you do not have plexpass. -Hardware accelleration users for Intel Quicksync will need to mount their /dev/dri video device inside of the container by passing the following command when running or creating the container: +Hardware acceleration users for Intel Quicksync will need to mount their /dev/dri video device inside of the container by passing the following command when running or creating the container: ```--device=/dev/dri:/dev/dri``` We will automatically ensure the abc user inside of the container has the proper permissions to access this device. -Hardware accelleration users for Nvidia will need to install the container runtime provided by Nvidia on their host, instructions can be found here: +Hardware acceleration users for Nvidia will need to install the container runtime provided by Nvidia on their host, instructions can be found here: https://github.com/NVIDIA/nvidia-docker -We automatically add the necessary environment variables that will use all available GPU's on the host. Once nvidia-docker is installed on your host you will need to just start the docker with the nvidia container runtime ```--runtime=nvidia```. NVIDIA automatically mounts the GPU and drivers from your host into the plex docker. +We automatically add the necessary environment variable that will utilise all the features available on a GPU on the host. Once nvidia-docker is installed on your host you will need to re/create the docker container with the nvidia container runtime `--runtime=nvidia` and add an environment variable `-e NVIDIA_VISIBLE_DEVICES=all` (can also be set to a specific gpu's UUID, this can be discovered by running `nvidia-smi --query-gpu=gpu_name,gpu_uuid --format=csv` ). NVIDIA automatically mounts the GPU and drivers from your host into the plex docker. @@ -186,8 +187,28 @@ We automatically add the necessary environment variables that will use all avail * image version number * `docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/plex` +## Updating Info + +Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (ie. nextcloud, plex), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image. + +Below are the instructions for updating containers: + +### Via Docker Run/Create +* Update the image: `docker pull linuxserver/plex` +* Stop the running container: `docker stop plex` +* Delete the container: `docker rm plex` +* Recreate a new container with the same docker create parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved) +* Start the new container: `docker start plex` +* You can also remove the old dangling images: `docker image prune` + +### Via Docker Compose +* Update the image: `docker-compose pull linuxserver/plex` +* Let compose update containers as necessary: `docker-compose up -d` +* You can also remove the old dangling images: `docker image prune` + ## Versions +* **11.02.19:** - Fix nvidia variables, add device variables. * **16.01.19:** - Add pipeline logic, multi arch, and HW transcoding configuration; remove avahi service. * **07.09.18:** - Rebase to ubuntu bionic, add udev package. * **09.12.17:** - Fix continuation lines. diff --git a/readme-vars.yml b/readme-vars.yml index 21dbaf7..3de5b58 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -69,20 +69,21 @@ app_setup_block: | + **`public`**: will update plexpass users to the latest public version, useful for plexpass users that don't want to be on the bleeding edge but still want the latest public updates. + **``**: will select a specific version (eg 0.9.12.4.1192-9a47d21) of plex to install, note you cannot use this to access plexpass versions if you do not have plexpass. - Hardware accelleration users for Intel Quicksync will need to mount their /dev/dri video device inside of the container by passing the following command when running or creating the container: + Hardware acceleration users for Intel Quicksync will need to mount their /dev/dri video device inside of the container by passing the following command when running or creating the container: ```--device=/dev/dri:/dev/dri``` We will automatically ensure the abc user inside of the container has the proper permissions to access this device. - Hardware accelleration users for Nvidia will need to install the container runtime provided by Nvidia on their host, instructions can be found here: + Hardware acceleration users for Nvidia will need to install the container runtime provided by Nvidia on their host, instructions can be found here: https://github.com/NVIDIA/nvidia-docker - We automatically add the necessary environment variables that will use all available GPU's on the host. Once nvidia-docker is installed on your host you will need to just start the docker with the nvidia container runtime ```--runtime=nvidia```. NVIDIA automatically mounts the GPU and drivers from your host into the plex docker. + We automatically add the necessary environment variable that will utilise all the features available on a GPU on the host. Once nvidia-docker is installed on your host you will need to re/create the docker container with the nvidia container runtime `--runtime=nvidia` and add an environment variable `-e NVIDIA_VISIBLE_DEVICES=all` (can also be set to a specific gpu's UUID, this can be discovered by running `nvidia-smi --query-gpu=gpu_name,gpu_uuid --format=csv` ). NVIDIA automatically mounts the GPU and drivers from your host into the plex docker. # changelog changelogs: + - { date: "11.02.19:", desc: "Fix nvidia variables, add device variables." } - { date: "16.01.19:", desc: "Add pipeline logic, multi arch, and HW transcoding configuration; remove avahi service." } - { date: "07.09.18:", desc: "Rebase to ubuntu bionic, add udev package." } - { date: "09.12.17:", desc: "Fix continuation lines." } diff --git a/root/etc/services.d/plex/run b/root/etc/services.d/plex/run index d4cd295..5fbbc93 100644 --- a/root/etc/services.d/plex/run +++ b/root/etc/services.d/plex/run @@ -1,6 +1,8 @@ #!/usr/bin/with-contenv bash echo "Starting Plex Media Server." +export PLEX_MEDIA_SERVER_INFO_MODEL=$(uname -m) +export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION=$(uname -r) exec \ s6-setuidgid abc /bin/bash -c \ 'LD_LIBRARY_PATH=/usr/lib/plexmediaserver:/usr/lib/plexmediaserver/lib /usr/lib/plexmediaserver/Plex\ Media\ Server'