Guides HOWTO: Enable NVIDIA GPU Support in PLEX/EMBY

justinglock40

Respected Member
Original poster
Local time
1:43 AM
May 27, 2018
66
13
Adding Nvidia GPU Support to Plex Docker.

First, on the system host. Install the most recent Nvidia Driver or you preferred version.
https://www.nvidia.com/en-us/drivers/unix/
***If you have a Card such as a 9XX/10XX/20XX/16XX Series, please refer to these instructions to get the card unlock patch install and setup. Make sure you install the corresponding patch with the drive you installed above.

https://github.com/keylase/nvidia-patch
After that is done you must prepare your system for passthrough to Plex/Emby.



Recommend following his steps for installing the driver and patch so you don’t get overly confused.

# Add the package repositories


curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update

# Install nvidia-docker2 and reload the Docker daemon configuration
sudo apt-get install -y nvidia-docker2

YOU MAY GET THIS MESSAGE :

Configuration file '/etc/docker/daemon.json'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** daemon.json (Y/I/N/O/D/Z) [default=N] ?
*****CHOOSE YES FOR THE NVIDIA RUNTIME TO BE AVAILABLE******

# Restart docker
sudo pkill -SIGHUP dockerd

# Test nvidia-smi with the latest official CUDA image
docker run --runtime=nvidia --rm nvidia/cuda nvidia-smi


After this is complete, you will need to add the following environment variables to your PLEX/EMBY install:

Goto Portainer and click “Duplicate/Edit” on the respective container, then go to the ENV tab and add the information below:
NVIDIA_VISIBLE_DEVICES=all
NVIDIA_DRIVER_CAPABILITIES=compute,video,utility

Lastly go to the runtime & resources area and change to “nvidia”, and redeploy the container.

Any container added after this install with have exposure to nvidia gpu automatically. IF you need the container to actually access the GPU then you must add those environmental variables. I would do a pull request to have them added to the yaml, but I don't know how to.
 
  • Like
Reactions: timekills and Sret

justinglock40

Respected Member
Original poster
Local time
1:43 AM
May 27, 2018
66
13
You shouldn't I put in a pull requests to add the necessary lines when Plex is reloaded and installed not sure if it's been merged or not
 

bubbadk

Legendary Member
Staff
Local time
8:43 AM
Mar 18, 2018
313
75
Denmark
i dont know what the problem is. have you done anything now :)
Post automatically merged:

still get this error
 

Attachments

Last edited:

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.


Maintenance Donations

Recommend NewsGroups

      Up To a 58% Discount!

Trending