From a0fbde5776cfe52980a2c5fd0ed7242b7bee7050 Mon Sep 17 00:00:00 2001 From: aptalca Date: Sat, 9 Feb 2019 17:27:10 +0000 Subject: [PATCH] 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'