错误libnvidia-ml.so.1:无法打开使用gpu运行docker映像时引发的共享对象文件



错误:

nvidia-container-cli: initialization error: load library 
failed: libnvidia-ml.so.1: cannot open shared object file: no 
such file or directory: unknown

我正在尝试使用docker hub中的nvidia/cuda图像来使用GPU。所以我用--gpus-all运行下面的代码。

docker run -it --gpus all -v --name my-gpu nvidia/cuda:11.7.0-cudnn8-devel-ubuntu22.04

但这给了我一个错误,如下所示。

Unable to find image 'nvidia/cuda:11.7.0-cudnn8-devel-ubuntu22.04' locally
11.7.0-cudnn8-devel-ubuntu22.04: Pulling from nvidia/cuda
d19f32bd9e41: Already exists 
292e5e4dcc78: Already exists 
f027458ef473: Already exists 
ad9cd0a3350e: Already exists 
4c0e748dfb24: Already exists 
e40f2cbf6f5e: Pull complete 
3ac150f167fe: Pull complete 
dd80ebac36de: Pull complete 
fd2716719ab6: Pull complete 
e5ff1925518e: Pull complete 
Digest: sha256:1055a2fa47b063336f578f390131efa4bb02fbfe095608481fd32b6fca9b8b32
Status: Downloaded newer image for nvidia/cuda:11.7.0-cudnn8-devel-ubuntu22.04
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.
ERRO[0465] error waiting for container: context canceled 

但如果我用sudo运行相同的代码,它会完全正常工作。

sudo docker run -it --gpus all --name my-container-03  nvidia/cuda:11.7.0-cudnn8-devel-ubuntu22.04

没有sudo我怎么能让它运行?在我的情况下,我现在决不能和须藤一起跑步。

我已经描述了错误。就我而言,有帮助的是:

卸载所有内容(预先存在的CUDA+Nvidia驱动程序+docker(。然后按照步骤进行安装(预安装、安装、安装后(:

https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html

该指南包含卸载&安装(我使用和工作过(。

当我安装docker桌面时,它被解决了。

相关内容

  • 没有找到相关文章

最新更新