From a0fbde5776cfe52980a2c5fd0ed7242b7bee7050 Mon Sep 17 00:00:00 2001 From: aptalca Date: Sat, 9 Feb 2019 17:27:10 +0000 Subject: [PATCH 1/4] fix nvidia vars, add device vars --- Dockerfile | 7 ++++--- Dockerfile.aarch64 | 5 +++-- Dockerfile.armhf | 5 +++-- README.md | 21 +++++++++++++++++++++ readme-vars.yml | 1 + root/etc/services.d/plex/run | 2 ++ 6 files changed, 34 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index fa7b9c4..773f90e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ 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" +ENV NVIDIA_VISIBLE_DEVICES="all" # global environment settings ENV DEBIAN_FRONTEND="noninteractive" \ @@ -17,9 +17,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..53498bd 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..529f8b4 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..2e9d60f 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 @@ -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 +* **09.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..36cafb1 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -83,6 +83,7 @@ app_setup_block: | # changelog changelogs: + - { date: "09.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' From ca9c86ca4437a8150d3e7cd5bcbd05695c912f00 Mon Sep 17 00:00:00 2001 From: aptalca Date: Sat, 9 Feb 2019 17:30:04 +0000 Subject: [PATCH 2/4] standardize --- Dockerfile.armhf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.armhf b/Dockerfile.armhf index 529f8b4..bb7f8c1 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -15,7 +15,7 @@ ENV DEBIAN_FRONTEND="noninteractive" \ PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" \ PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \ 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)" From 0fa38675c2e3e871b412ea0bbbb7111a8697aef1 Mon Sep 17 00:00:00 2001 From: aptalca Date: Mon, 11 Feb 2019 21:08:30 +0000 Subject: [PATCH 3/4] remove nvidia devices variable, add info to readme --- Dockerfile | 3 +-- Dockerfile.aarch64 | 2 +- Dockerfile.armhf | 2 +- README.md | 4 ++-- readme-vars.yml | 4 ++-- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 773f90e..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_VISIBLE_DEVICES="all" # global environment settings ENV DEBIAN_FRONTEND="noninteractive" \ @@ -20,7 +19,7 @@ PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \ PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \ PLEX_MEDIA_SERVER_USER="abc" \ PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \ -PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (linuxserver.io)" +PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)" RUN \ echo "**** install runtime packages ****" && \ diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 53498bd..3aa48c8 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -17,7 +17,7 @@ PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \ PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \ PLEX_MEDIA_SERVER_USER="abc" \ PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \ -PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (linuxserver.io)" +PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)" RUN \ echo "**** install runtime packages ****" && \ diff --git a/Dockerfile.armhf b/Dockerfile.armhf index bb7f8c1..1e2a6dc 100644 --- a/Dockerfile.armhf +++ b/Dockerfile.armhf @@ -17,7 +17,7 @@ PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \ PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \ PLEX_MEDIA_SERVER_USER="abc" \ PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \ -PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (linuxserver.io)" +PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)" RUN \ echo "**** install runtime packages ****" && \ diff --git a/README.md b/README.md index 2e9d60f..16085b5 100644 --- a/README.md +++ b/README.md @@ -174,7 +174,7 @@ Hardware accelleration users for Nvidia will need to install the container runti 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 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``` and add an environment variable ```-e NVIDIA_VISIBLE_DEVICES=all``` (can also be set to a specific gpu's UUID). NVIDIA automatically mounts the GPU and drivers from your host into the plex docker. @@ -208,7 +208,7 @@ Below are the instructions for updating containers: ## Versions -* **09.02.19:** - Fix nvidia variables, add device variables. +* **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 36cafb1..5192ec4 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -79,11 +79,11 @@ app_setup_block: | 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 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``` and add an environment variable ```-e NVIDIA_VISIBLE_DEVICES=all``` (can also be set to a specific gpu's UUID). NVIDIA automatically mounts the GPU and drivers from your host into the plex docker. # changelog changelogs: - - { date: "09.02.19:", desc: "Fix nvidia variables, add device variables." } + - { 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." } From c0a4d5809d3f60cc8abc24043db008f44bf99942 Mon Sep 17 00:00:00 2001 From: aptalca Date: Mon, 11 Feb 2019 16:48:54 -0500 Subject: [PATCH 4/4] improve nvidia instructions --- README.md | 6 +++--- readme-vars.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 16085b5..4984db9 100644 --- a/README.md +++ b/README.md @@ -164,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``` and add an environment variable ```-e NVIDIA_VISIBLE_DEVICES=all``` (can also be set to a specific gpu's UUID). 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. diff --git a/readme-vars.yml b/readme-vars.yml index 5192ec4..3de5b58 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -69,17 +69,17 @@ 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``` and add an environment variable ```-e NVIDIA_VISIBLE_DEVICES=all``` (can also be set to a specific gpu's UUID). 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: