TrueNAS Core 13 Nvidia Pascal GPU pass-through Jellyfin container recipe

itronin

Well-Known Member
Nov 24, 2018
959
616
93
Denver, Colorado
Posting this link for the benefit of those that might be interested:


TLDR
working config recipe for Ubuntu VM with Nvidia Pascal GPU on TNC 13.0-U2
config is VERY version dependent on underlying components' versions
recipe is for docker'ing with jellyfin.
works just fine running emby at the OS level (no docker - stopped after step 15 and installed emby).

a little longer
I just received my parts to begin building a standalone emby box and was thinking of using TN Scale and so I refreshed my search on pass-through gpu's and came up with this article.

I can confirm it works as stated as far as just running emby on the OS . I'm more interested in getting this working for home use rather than figuring out what other distro and drive combinations might work. I'm also not an expert with bhyve nor gpu pass through.

Host tested with TNC 13.0-U3 - works fine.
HW tested using P400 and P620 - works fine.

Guest tested on Ubuntu 22.0.4 - but no dice on getting nvidia drivers to compile. I did not go further.
Guest tested on Rocky 8.6 as I'm more familiar with CentOS. Kernel panics with pci devices passed through

future steps
Testing with Nvidia P2000 - I expect this to also just like the P400 and P620

edit - should not be a surprise
Quadro P2000 check
Tesla P4 check
 
Last edited:
  • Like
Reactions: BoredSysadmin

CyklonDX

Member
Nov 8, 2022
51
12
8
If I may, to have docker on host without passing through the GPU to VM; you do not need to follow most of those steps.
Install nv drivers, and then install nvidia-docker2

Add following

params
--runtime=nvidia --gpus all

variables
NVIDIA_VISIBLE_DEVICES = all
NVIDIA_DRIVER_CAPABILITIES = all


example
docker run --runtime=nvidia --gpus all -e NVIDIA_VISIBLE_DEVICES=all -e NVIDIA_DRIVER_CAPABILITIES=all
 
  • Like
Reactions: gb00s and itronin

itronin

Well-Known Member
Nov 24, 2018
959
616
93
Denver, Colorado
Tesla P4 also works

Code:
$ nvidia-smi
Tue Nov 22 23:10:06 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.57.02    Driver Version: 470.57.02    CUDA Version: 11.4     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla P4            Off  | 00000000:00:05.0 Off |                    0 |
| N/A   52C    P0    24W /  75W |      0MiB /  7611MiB |      1%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

Code:
    "Devices": [
        {
            "DeviceIndex": 0,
            "DeviceInfo": {
                "VendorName": "NVIDIA Corporation",
                "DeviceName": "GP104GL [Tesla P4]",
                "SubsytemVendorName": "NVIDIA Corporation",
                "VendorId": 4318,
                "DeviceId": 7091,
                "SubsytemVendorId": 4318,
                "SubsytemDeviceId": 4568,
                "DevPath": "/sys/bus/pci/devices/0000:00:05.0",
                "DrmCard": "/dev/dri/card0",
                "DrmRender": "/dev/dri/renderD128",
                "IsEnabled": 1,
                "IsBootVga": 0,
                "Error": {
                    "Number": -1,
                    "Message": "Failed to initialize VA /dev/dri/renderD128. Error -1"
                }
            }
        },