Introduction and issue ¶
Truenas Scale is a great solution to having your own at-home home-lab, NAS with plugins, apps and VMs. It is solid for basic NAS and is feature-rich for homelab setups all the way up to the Enterprise space.
There are a few usability issues with the system and it is not for the normal home user. You will come across things that seemingly should work out of the box but encounter odd behavior. One such is a GPU issue. One such issue I am going to outline in this post.
The Apps selection on Truenas Scale is great & immense with over 400 installable applications (once you add the community repository, read more on that HERE )
But the UI may make you think you can only use a GPU with one application:
When you assign a GPU to an application and then try to Start the app it will never become Active and you will see this type of error:
2023-04-14 19:48:53
0/1 nodes are available: 1 Insufficient nvidia.com/gpu. preemption: 0/1 nodes are available: 1 No preemption victims found for incoming pod.
This is occurring because we have already set Allocate 1 nvidia.com/gpu GPU
to another App.
Is there a resolution?
Finding a solution to allow multiple apps to use a single GPU ¶
Yes, there is a solution that will resolve this. However, it is not easily findable in The Truenas documentation.
Firstly remove all GPU allocations on your apps so they appear like this:
Then the solution is to add the following Environment Variables to any Truenas Scale App you want to have GPU access:
Name | Value |
---|---|
RUNTIME | nvidia |
NVIDIA_DRIVER_CAPABILITIES | all |
NVIDIA_VISIBLE_DEVICES | all |
Screenshot
This works, you can add this to as many apps as you want and the GPU (in my limited testing) will work in all of them no issue.
The source of the solution came from Truenas Forum - Can multiple apps utilize the same GPU? #4