Not seeing NVidia card in containers.
- Linguagem predominante
- Go
- Estrelas
- 13k
- Forks
- 541
- Merge médio
- 20h 47min
- PRs com merge (30d)
- 4
Descrição
**Describe the bug**
On my debian 12 host I have an `NVIDIA GeForce GTX 1050 Ti` that uses the propriety driver `535.247.01`.
I've created 2 containers, 1 arch the other tumbleweed using the `--nvidia` switch -
`distrobox create -n arch2 --hostname arch2 -i --nvidia docker.io/library/archlinux:latest`
`distrobox create -n tumbleweed --hostname tumbleweed --nvidia -i registry.opensuse.org/opensuse/tumbleweed:latest`
I get a delay of about 20secs starting the container each time at
`Setting up host's nvidia integration... [ OK ]` line.
The problem is I have installed the `handbrake` encoder on each and wanting to make use of the GPU `NVenc` codec.
However, when I run `handbrake` on either container I then this error before the app's GUI opens.
```
chris@arch:~>$ghb
libEGL warning: DRI3 error: Could not get DRI3 device
libEGL warning: Activate DRI3 at Xorg or build mesa with DRI2
libEGL warning: DRI3 error: Could not get DRI3 device
libEGL warning: Activate DRI3 at Xorg or build mesa with DRI2
chris@arch:~>$
```
The app's GUI then opens but there is no `NVenc` ecoding option which I suspect tells me I don't see my GPU.
From one google search I found this tip of adding a conf file
```
chris@tumbleweed:~>$cat /etc/X11/xorg.conf.d/20-nvidia.conf
Section "Device"
Identifier "NVIDIA Card"
Driver "nvidia"
Option "DRI" "3"
EndSection
```
but that did not help.
**To Reproduce**
Steps to reproduce the behavior
**Expected behavior**
I expect to see the `NVenc` codec as I do here on my host's `handbrake`.

**Logs**
Run the commands with `--verbose` and post the log here as a file upload
Attach also the output of `podman logs` or `docker logs`, possibly with `--latest` flag
[distrobox.log](https://github.com/user-attachments/files/20744286/distrobox.log)
**Desktop (please complete the following information):**
- Are you using podman, docker or lilipod? podman
- Which version or podman, docker or lilipod? 5.4.2
- Which version of distrobox? 1.8.1.2
- Which host distribution? debian 12.11
- How did you install distrobox? via curl/sh option.
**Additional context**
Add any other context about the problem here.
Guia de contribuição
Direção de pesquisa
A issue trata do fato de a GPU NVIDIA não estar acessível dentro dos contêineres distrobox apesar do uso da flag --nvidia. Comece examinando os scripts de integração do distrobox para NVIDIA, provavelmente em /usr/share/distrobox ou em um local semelhante. Verifique os logs detalhados anexados para ver o que acontece durante a etapa 'Setting up host's nvidia integration'. Verifique as variáveis de ambiente do contêiner e os mounts de dispositivos. O objetivo é garantir que a GPU e os drivers sejam expostos corretamente ao contêiner para que o HandBrake possa detectar o NVenc.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- docker, shell
- Domínio
- cli, tooling
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Pouca atividade
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 45/100