Closed superfunk2000 closed 1 year ago
Sorry you are having issues!
Can you run nvidia-smi
inside the container and show me the output?
I would also like to see your docker run command, or docker-compose file if you are using that.
With the newest nvidia container toolkit you must have your compose file with something like this in it:
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
EDIT: You must also HAVE nvidia-container-runtime / toolkit as well. I had it working on my setup with versions nvidia-container-runtime 3.13.0-1 nvidia-container-toolkit 1.13.2-1
All detailed in nvidia's container guide.
@roflcoopter:
root@eafbdbbdc8e2:/src# nvidia-smi
bash: nvidia-smi: command not found
@bailboy91:
$ docker compose up -d && docker compose logs -f
[+] Building 0.0s (0/0)
[+] Running 0/1
⠹ Container viseron Starting 0.2s
Error response from daemon: could not select device driver "nvidia" with capabilities: [[gpu]]
I read through the NVIDIA page to install the NVIDIA Container Toolkit. I'm already failing when trying to install the "nvidia-container-toolkit-base".
$ sudo apt-get install -y nvidia-container-toolkit-base
Reading package lists... Done
Building dependency tree... Done
Status information is read in... Done
E: Package nvidia-container-toolkit-base cannot be found.
I have to say that I'm not a Linux specialist. But I can google...
@superfunk2000 I was in your boat when I found viseron too. A lot of bits of information and lack luster documentation from Nvidia on setting things up.
On my working cuda machine I used apt-cache madison nvidia-container-toolkit-base
and that told me what repo it came from. The link below should get you going. I also have a cuda repo that i believe I needed as well but i have a quadro card and I can't remember if it's different than a consumer gpu.
Hello @bailboy91,
thank you for the hint. I've installed the nvidia-container-toolkit from your link. A first test was positive:
$ sudo docker run --rm --runtime=nvidia --gpus all nvidia/cuda:11.6.2-base-ubuntu20.04 nvidia-smi
Fri Jun 30 14:40:37 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.54.03 Driver Version: 535.54.03 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| 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 GeForce GTX 1660 Ti On | 00000000:29:00.0 Off | N/A |
| 0% 48C P8 4W / 120W | 1MiB / 6144MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| No running processes found |
+---------------------------------------------------------------------------------------+`
After that, I added
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
in my docker-compose.yaml.
Now it looks like this:
But what about VA API? I wanted to install "vdpau-va-driver" but the package is only available up to Ubuntu 18.04 LTS and was removed from sources after that. apt-get suggested "mesa-va-drivers" for me to install, but this did not bring any improvement.
Any ideas?
vainfo brings this information:
$vainfo
error: can't connect to X server!
error: failed to initialize display
Do I need to install the X Server?
Do you have a va-api compatibe card? Viseron will use the nvidia gpu for everything. It will just use nvidia encoders / CUDA to to all the magic in Viseron. You can add say a Google Coral TPU to the mix as well (What I'm doing now actually).
I've only ever used the nvidia encoders and cuda in viseron.
If you do have say an intel gpu or amd gpu as well in the machine you would use MESA drivers and mesa has a vaapi package. But as far as I've tested in Viseron you should choose either CUDA or Vaapi, not both.
OK, so I'm happy with the configuration now. Thanks very much!
For three days I've been trying to get Viseron to run with GPU support. Now I need your help in configuring:
Installed versions:
Why is Viseron not activating hardware acceleration?
And the following error message comes up?
I don't know what to do and hope you can help me.