You are not logged in.

#1 2024-01-05 15:17:39

eom.dev
Member
Registered: 2022-02-11
Posts: 57

Nvidia GPU in Systemd-nspawn

I have a server with a Nvidia gpu that I would like to utilize within a systemd-nspawn container (both Arch).  Everything is working on the host:

% nvidia-smi
Fri Jan  5 15:11:26 2024       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 545.29.06              Driver Version: 545.29.06    CUDA Version: 12.3     |
|-----------------------------------------+----------------------+----------------------+
| 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  NVIDIA RTX A6000               Off | 00000000:B3:00.0 Off |                  Off |
| 30%   50C    P0              N/A / 300W |      2MiB / 49140MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|  No running processes found                                                           |
+---------------------------------------------------------------------------------------+

But the guest returns an error:

% nvidia-smi
Failed to initialize NVML: Unknown Error

I have tried both the nvidia-gpu.conf override recommended in the wiki, as well as several combinations of manually binding some of those same paths in the .nspawn file as well.

Last edited by eom.dev (2024-01-05 15:21:09)

Offline

Board footer

Powered by FluxBB