Skip to content

Commit 8bad017

Browse files
authored
Merge pull request #154 from linuxserver/nvidia
fix nvidia vars, add device vars
2 parents 9109939 + c0a4d58 commit 8bad017

File tree

6 files changed

+39
-13
lines changed

6 files changed

+39
-13
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ LABEL maintainer="sparklyballs, thelamer"
99

1010
#Add needed nvidia environment variables for https://github.com/NVIDIA/nvidia-docker
1111
ENV NVIDIA_DRIVER_CAPABILITIES="compute,video,utility"
12-
ENV NVIDIA_DRIVER_CAPABILITIES="all"
1312

1413
# global environment settings
1514
ENV DEBIAN_FRONTEND="noninteractive" \
1615
PLEX_DOWNLOAD="https://downloads.plex.tv/plex-media-server" \
1716
PLEX_INSTALL="https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu" \
1817
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" \
1918
PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \
20-
PLEX_MEDIA_SERVER_INFO_DEVICE=docker \
2119
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \
22-
PLEX_MEDIA_SERVER_USER=abc
20+
PLEX_MEDIA_SERVER_USER="abc" \
21+
PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \
22+
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
2323

2424
RUN \
2525
echo "**** install runtime packages ****" && \

Dockerfile.aarch64

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ LABEL maintainer="sparklyballs, thelamer"
1414
ENV DEBIAN_FRONTEND="noninteractive" \
1515
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" \
1616
PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \
17-
PLEX_MEDIA_SERVER_INFO_DEVICE=docker \
1817
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \
19-
PLEX_MEDIA_SERVER_USER=abc
18+
PLEX_MEDIA_SERVER_USER="abc" \
19+
PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \
20+
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
2021

2122
RUN \
2223
echo "**** install runtime packages ****" && \

Dockerfile.armhf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ LABEL maintainer="sparklyballs, thelamer"
1414
ENV DEBIAN_FRONTEND="noninteractive" \
1515
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="/config/Library/Application Support" \
1616
PLEX_MEDIA_SERVER_HOME="/usr/lib/plexmediaserver" \
17-
PLEX_MEDIA_SERVER_INFO_DEVICE=docker \
1817
PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS="6" \
19-
PLEX_MEDIA_SERVER_USER=abc
18+
PLEX_MEDIA_SERVER_USER="abc" \
19+
PLEX_MEDIA_SERVER_INFO_VENDOR="Docker" \
20+
PLEX_MEDIA_SERVER_INFO_DEVICE="Docker Container (LinuxServer.io)"
2021

2122
RUN \
2223
echo "**** install runtime packages ****" && \

README.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ In this instance `PUID=1001` and `PGID=1001`, to find yours use `id user` as bel
145145
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
146146
```
147147

148+
148149
 
149150
## Application Setup
150151

@@ -163,17 +164,17 @@ Valid settings for VERSION are:-
163164
+ **`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.
164165
+ **`<specific-version>`**: 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.
165166

166-
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:
167+
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:
167168

168169
```--device=/dev/dri:/dev/dri```
169170

170171
We will automatically ensure the abc user inside of the container has the proper permissions to access this device.
171172

172-
Hardware accelleration users for Nvidia will need to install the container runtime provided by Nvidia on their host, instructions can be found here:
173+
Hardware acceleration users for Nvidia will need to install the container runtime provided by Nvidia on their host, instructions can be found here:
173174

174175
https://github.com/NVIDIA/nvidia-docker
175176

176-
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.
177+
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.
177178

178179

179180

@@ -186,8 +187,28 @@ We automatically add the necessary environment variables that will use all avail
186187
* image version number
187188
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/plex`
188189

190+
## Updating Info
191+
192+
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.
193+
194+
Below are the instructions for updating containers:
195+
196+
### Via Docker Run/Create
197+
* Update the image: `docker pull linuxserver/plex`
198+
* Stop the running container: `docker stop plex`
199+
* Delete the container: `docker rm plex`
200+
* 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)
201+
* Start the new container: `docker start plex`
202+
* You can also remove the old dangling images: `docker image prune`
203+
204+
### Via Docker Compose
205+
* Update the image: `docker-compose pull linuxserver/plex`
206+
* Let compose update containers as necessary: `docker-compose up -d`
207+
* You can also remove the old dangling images: `docker image prune`
208+
189209
## Versions
190210

211+
* **11.02.19:** - Fix nvidia variables, add device variables.
191212
* **16.01.19:** - Add pipeline logic, multi arch, and HW transcoding configuration; remove avahi service.
192213
* **07.09.18:** - Rebase to ubuntu bionic, add udev package.
193214
* **09.12.17:** - Fix continuation lines.

readme-vars.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,21 @@ app_setup_block: |
6969
+ **`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.
7070
+ **`<specific-version>`**: 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.
7171
72-
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:
72+
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:
7373
7474
```--device=/dev/dri:/dev/dri```
7575
7676
We will automatically ensure the abc user inside of the container has the proper permissions to access this device.
7777
78-
Hardware accelleration users for Nvidia will need to install the container runtime provided by Nvidia on their host, instructions can be found here:
78+
Hardware acceleration users for Nvidia will need to install the container runtime provided by Nvidia on their host, instructions can be found here:
7979
8080
https://github.com/NVIDIA/nvidia-docker
8181
82-
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.
82+
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.
8383
8484
# changelog
8585
changelogs:
86+
- { date: "11.02.19:", desc: "Fix nvidia variables, add device variables." }
8687
- { date: "16.01.19:", desc: "Add pipeline logic, multi arch, and HW transcoding configuration; remove avahi service." }
8788
- { date: "07.09.18:", desc: "Rebase to ubuntu bionic, add udev package." }
8889
- { date: "09.12.17:", desc: "Fix continuation lines." }

root/etc/services.d/plex/run

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/with-contenv bash
22

33
echo "Starting Plex Media Server."
4+
export PLEX_MEDIA_SERVER_INFO_MODEL=$(uname -m)
5+
export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION=$(uname -r)
46
exec \
57
s6-setuidgid abc /bin/bash -c \
68
'LD_LIBRARY_PATH=/usr/lib/plexmediaserver:/usr/lib/plexmediaserver/lib /usr/lib/plexmediaserver/Plex\ Media\ Server'

0 commit comments

Comments
 (0)