错误:
nvidia-container-cli: initialization error: load library
failed: libnvidia-ml.so.1: cannot open shared object file: no
such file or directory: unknown
Run Code Online (Sandbox Code Playgroud)
我正在尝试在 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
Run Code Online (Sandbox Code Playgroud)
但这给了我错误,如下所示。
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
Run Code Online (Sandbox Code Playgroud)
但如果我使用 sudo 运行相同的代码,它就完全可以正常工作。
sudo docker run -it --gpus all --name my-container-03 nvidia/cuda:11.7.0-cudnn8-devel-ubuntu22.04
Run Code Online (Sandbox Code Playgroud)
我怎样才能让它在没有 sudo 的情况下运行?我现在不能使用 sudo 运行。
| 归档时间: |
|
| 查看次数: |
12059 次 |
| 最近记录: |