Can multiple apps utilize the same GPU?

GenericEric

Cadet
Joined
Aug 28, 2022
Messages
9
Lets make some guesses here... maybe the nvidia device plugin, reads the env-vars?
I'd say it's likely. On my regular k8s cluster with LinuxServer.io containers, it's the same deal.
 

Heavy

Explorer
Joined
Aug 12, 2021
Messages
57
Apps can share the same GPU. I've been doing it forever. When your setting up the deployment, do not allocate GPU to it as it will not allow any other pod to use it.

Set your env variables like this on each deployment to utilize GPU:
View attachment 58020
This is honestly pretty incredible. I, as well as most people thought you couldn't use a GPU for more than one application. I wonder how many other things I take 100%, but turn out to not be true.

Just tested it out and both Jellyfin and Plex can use my P2200 now. Thanks a ton for this.
 

GenericEric

Cadet
Joined
Aug 28, 2022
Messages
9
This is honestly pretty incredible. I, as well as most people thought you couldn't use a GPU for more than one application. I wonder how many other things I take 100%, but turn out to not be true.

Just tested it out and both Jellyfin and Plex can use my P2200 now. Thanks a ton for this.
Cheers!
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
This is honestly pretty incredible. I, as well as most people thought you couldn't use a GPU for more than one application. I wonder how many other things I take 100%, but turn out to not be true.

Just tested it out and both Jellyfin and Plex can use my P2200 now. Thanks a ton for this.

It was definately always possible with at least a few more tricks, it was more a question of "what is needed" rather than "is it possible".
In theory every container can get granted access to every hardware device///

I'd say it's likely. On my regular k8s cluster with LinuxServer.io containers, it's the same deal.

Did you have the nvidia mumbo-jumbo deamonsets running on that cluster as well?
 

GenericEric

Cadet
Joined
Aug 28, 2022
Messages
9
It was definately always possible with at least a few more tricks, it was more a question of "what is needed" rather than "is it possible".
In theory every container can get granted access to every hardware device///



Did you have the nvidia mumbo-jumbo deamonsets running on that cluster as well?
Yeah, I use the full nvidia gpu-operator. Deploys the toolkit, driver, and node tagger all in containers.
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
Yeah, I use the full nvidia gpu-operator. Deploys the toolkit, driver, and node tagger all in containers.

Okey, so both setups (yours and SCALE), both deploy GPU's when those env-vars are set in kubernetes, but don't when it's set by-default on the container level.
Would be interesting to see how it works on a clean cluster without the operator and toolkit :)
 

ChaosBlades

Contributor
Joined
Jul 4, 2015
Messages
137

Have you seen this post by nvidia on getting this working? What is the feasibility of ixSystem integrating this functionality?
 

ncw1978

Dabbler
Joined
Sep 22, 2022
Messages
19
Hi
Has anyone had any look using this with Handbrake as i can get it working with plex but not with Handbrake


Thanks
 

guiguijke

Cadet
Joined
Jun 9, 2022
Messages
6
This trick made my day : I can now use my Quadro RTX5000 for Plex and Tdarr =)
Thank you very much
 

klewis

Cadet
Joined
Dec 23, 2022
Messages
9
Hi
Has anyone had any look using this with Handbrake as i can get it working with plex but not with Handbrake


Thanks
Seconding this. I tried to make this work with Handbrake and had no luck. Anyone get this working and have any tips to share?
 
Joined
Jan 27, 2020
Messages
577
Would this also be possible with Intel Quicksync?
 

Klyoku

Cadet
Joined
Jun 24, 2016
Messages
8
This worked for plex for me as well. However, seems like it does not work for the motioneye container that I also run.
 

pblab

Cadet
Joined
Apr 19, 2020
Messages
8
This solution works really well on my setup:
Screenshot 2023-02-14 at 21.34.37.png

Just as an example, these are 2 plex and one emby container transcoding at the same time (all files are 4k to 1080p). GPU is a GTX 1050 Ti which is configured as passthrough on my ESX 8 server (incl. HBA, nvme) :smile: Just don't isolate your GPU in the advanced settings!

these are my plex app settings if it helps:
Screenshot 2023-02-14 at 21.42.05.png
 

Saberwolf

Explorer
Joined
Feb 7, 2021
Messages
63
Currently there is no support for using same GPU on multiple apps (upstream issue, not iX's).
Also note for tdarr, it's quite tricky to setup (folders and networking related), I have it on my todo list to fix it up a bit in the near future :P
this is not true any more you have to set the

Environment variables (OCI spec)​


you need to pass two env variables

NVIDIA_VISIBLE_DEVICES

NVIDIA_DRIVER_CAPABILITIES

Please read the above documentation i will show you i have two container running and using one gpu. you must have the gpu in the bottom of the settings page selected to 0 no gpu as the UI implements a version of KUBERNETES resource. docker is what you want to use and you can do that from the ENV Variables section of the apps page from the UI.

i will try and help in any way i can.
1678994340742.png


1678994364142.png


1678994412609.png


1678994775666.png
 

Saberwolf

Explorer
Joined
Feb 7, 2021
Messages
63
Apps can share the same GPU. I've been doing it forever. When your setting up the deployment, do not allocate GPU to it as it will not allow any other pod to use it.

Set your env variables like this on each deployment to utilize GPU:
View attachment 58020
you have to know how the docker container you using is congured to use that runtime it may need to be something different you should only need CAPABILITIES and VISIBLE DEVICES
 

Crow

Cadet
Joined
Mar 23, 2023
Messages
8
OMG this is such a life saver. I was looking for a PCE 1x GPU to add to the system to free up my GPU.

I can confirm that this works at least to share an NVIDIA RTX 2600 with truenas scale and the plex in a container for transcoding.

Will need a gaming install on this system for rare gaming at some point (a VM most likely as I know of no container based option). I wonder if this will work with that as well. Would be nice to be able to install the steam OS on the truenas box as a VM and windows versions as well to play with.
 

Saberwolf

Explorer
Joined
Feb 7, 2021
Messages
63
OMG this is such a life saver. I was looking for a PCE 1x GPU to add to the system to free up my GPU.

I can confirm that this works at least to share an NVIDIA RTX 2600 with truenas scale and the plex in a container for transcoding.

Will need a gaming install on this system for rare gaming at some point (a VM most likely as I know of no container based option). I wonder if this will work with that as well. Would be nice to be able to install the steam OS on the truenas box as a VM and windows versions as well to play with.
Thats for the vote of confidence but it will not work in a vm this way to pull it into vm you must blacklist it from the host machine so you can attach it to the vm when you blacklist it form the host machine containers stop working my suggestion is to get a Quadro P2000 and the rtx 2600 let your vm take rtx for games and use the p2000 for every thing else p2000 take not extra power except for PCIE i use it to machine learning/transcode and all other CUDA operations you can get it work in linux docker container and play games but there might be some unforeseen issues my suggestion is to run a proxmox bare metal system and truenas scale container and vms proxmox just does a better job vm's and containers
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
@Saberwolf, you may want to take a breath, and break up your post into multiple sentences. As it is, it's an almost incomprehensible run-on sentence meandering all over creation.
 

mervincm

Contributor
Joined
Mar 21, 2014
Messages
157
Things appear to have changed.
plex no longer seems to detect the nvidia GPU
 
Last edited:
Top