docker-wechat icon indicating copy to clipboard operation
docker-wechat copied to clipboard

3.3.0.115 docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

Open kngharv opened this issue 2 years ago • 13 comments

I can't even get the container started.

Yet, I am not even sure this is a bug.

I am running Ubuntu/20.04.

I am running Wayland instead of X.

I am running nouveau driver instead of nvdia driver.

In addition, I am running a displaylink driver for my usb hub and two external screens.

So, my question of the day are:

  • is X necessary? or x-wayland should be fine?
  • is nvidia native driver necessary or nouveau driver is fine?
  • or, as people mentioned in other issue, is there a way we can skip the discrete GPU completely as an option?
  • is having displaylink video driver break this docker?

Or, it is something else that broke my container? I am not ruling out that I am the one which is broken.

thanks in advance

kngharv avatar May 06 '22 20:05 kngharv

I think starting with this commit, we start to try to run the container with GPU access. Perhaps you could try to modify the script locally by removing those lines and see if works?

sefeng211 avatar May 16 '22 15:05 sefeng211

@kngharv This https://github.com/NVIDIA/nvidia-docker/issues/1243 may help you.

kylesean avatar Jun 18 '22 07:06 kylesean

Managed to resolve this by installing nvidia-container-toolkit, as described in https://github.com/NVIDIA/nvidia-docker/issues/1243#issuecomment-928064024_

distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list

sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
sudo systemctl restart docker

qinenergy avatar Jun 27 '22 09:06 qinenergy

In my case, I can access the GPU from docker container right after a fresh install. The GPU error happens only after a reboot. I tried the possible methods mentioned but the issue remains.

docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

waiyc avatar Jun 30 '22 10:06 waiyc

I am running Arch, with KDE of 5.25.2. I am running Waylad, with XWayland installed ( google-chrome is using xwayland ) . I am running nvidia driver, and I installed nvidia-container-toolkit. I have only one 1920x1080 screen connected to GPU through HDMI. The version of the docker image is 3.3.0.115.

When I run DOCHAT_DEBUG=true bash ./dochat.sh, wechat didn't appear, and I get them in the latest output:

00e4:fixme:ver:GetCurrentPackageId (04BCFEF0 00000000): stub
00e4:fixme:sync:SetWaitableTimerEx (000000BC, 04BCFDA0, 0, 00000000, 00000000, 00000000, 1500) semi-stub
00e0:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
00e0:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
0120:fixme:iphlpapi:NotifyAddrChange (Handle 0x661fefc, overlapped 0x661fee4): stub
00e0:fixme:win:RegisterTouchWindow (00030040 00000000): stub
00e0:err:seh:NtRaiseException Unhandled exception code c0000005 flags 0 addr 0x7bc2a1f5

Then I tried removing those 3 lines that @sefeng211 mentioned, but it didn't work.

Can anyone help? Thanks in advance!

Jiawens avatar Jul 09 '22 06:07 Jiawens

In my case, I can access the GPU from docker container right after a fresh install. The GPU error happens only after a reboot. I tried the possible methods mentioned but the issue remains.

docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

I have the same issue. Rebooting makes the issue appear again. Have you been able to solve that?

frankmanbb avatar Jul 23 '22 21:07 frankmanbb

@Jiawens @frankmanbb Have you tried to install nvidia-container-toolkit as what @qinenergy pointed?

sefeng211 avatar Jul 25 '22 23:07 sefeng211

@Jiawens @frankmanbb Have you tried to install nvidia-container-toolkit as what @qinenergy pointed?

I had installed nvidia-container-toolkit (mentioned in my previous reply), but it didn't work for me.

Anyway, thanks for your and @qinenergy's advice.

Jiawens avatar Jul 30 '22 09:07 Jiawens

I have the same question,but after installing "nvidia-container-toolkit" ,it report an error as

docker: Error response from daemon: failed to create shim: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: initialization error: nvml error: driver not loaded: unknown.

dying084 avatar Aug 10 '22 10:08 dying084

I have this issue on Ubuntu 22.04 too, any update please?

MacroUniverse avatar Sep 11 '22 18:09 MacroUniverse

Managed to resolve this by installing nvidia-container-toolkit, as described by @Demetrio92 in NVIDIA/nvidia-docker#1243 (comment)_

distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list

sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit
sudo systemctl restart docker

It does not work for me.

docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown.

gamesover avatar Sep 30 '22 12:09 gamesover

https://github.com/NVIDIA/nvidia-docker/issues/1447#issuecomment-757034464

mwdotzom avatar Oct 12 '22 12:10 mwdotzom

I received the same error here:

docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown.

After searching, I discovered that I did not install any Nvidia driver on the computer because I thought my laptop didn't have Nvidia graphic cards. Running this solved all the issues:

sudo apt-get install cuda

charles-typ avatar Nov 12 '22 02:11 charles-typ