在这个主题上,我看到了几个问题,并尝试了这两种方法。如有任何关于如何进行任何一条路线的建议,我们将不胜感激:
在WSL2内部运行nvidia-码头
我跟踪了NVIDIA博士和本教程。所有安装和docker命令都从Ubuntu20.04内部运行。但是,sudo service docker start返回:
docker: unrecognized service
更新:这变成了一个已知问题。我能够按照这些指示在Ubuntu上安装并运行docker。然而,接下来我会遇到一个像这样的问题
$docker run --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark
Status: Downloaded newer image for nvcr.io/nvidia/k8s/cuda-sample:nbody
docker: Error response from daemon: OCI runtime create failed: container_linux.go:370: starting container process caused: process_linux.go:459: container init caused: Running hook #0:: error running hook: exit status 1, stdout: , stderr: nvidia-container-cli: initialization error: nvml error: driver not loaded: unknown.
ERRO[0065] error waiting for container: context canceled在Windows上运行NVIDIA停靠程序:
另一个思想学派建议从WSL中移除停靠程序,然后运行Windows。然后我们就可以从WSL连接到它。好吧,我根本无法从Windows运行nvidia-docker:
$ docker run --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark
Unable to find image 'nvcr.io/nvidia/k8s/cuda-sample:nbody' locally
nbody: Pulling from nvidia/k8s/cuda-sample
...
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].此外,在从ubuntu中移除对接器之后,我仍然可以从Ubuntu20.04或者当我从Powershell运行wsl时运行对接:
$ which docker
/mnt/c/ProgramData/DockerDesktop/version-bin/docker
$ docker
The command 'docker' could not be found in this WSL 2 distro.
We recommend to activate the WSL integration in Docker Desktop settings.
See https://docs.docker.com/docker-for-windows/wsl/ for details.我肯定启用了基于WSL2 2的引擎和Ubuntu20.04集成,在Docker设置中启用了两个不同的选项卡。
系统
Windows 10
WSL 2
Ubuntu 20.04 within WSL2
Windows Docker with WSL2-based engine and integration enabled任何帮助,如何进一步诊断它是非常感谢的。
发布于 2020-12-31 14:49:44
我认为让nVidia GPU (CUDA)在WSL2上运行的最好方法是遵循nVidia文档WSL上的CUDA的教程。有三件事你需要做的正确和有序:
在正确地预编好这三个步骤之后,您可以按照nVidia教程设置CUDA工具包进行操作。下面是另一个nVidia文档,它说明了您在第8章中面临的同样问题。
对我来说,这是我的版本,没有正确地设置为20145或更高版本。
发布于 2022-06-12 06:30:25
到2022年6月,在Windows 10下,我不需要做任何事情来启用它。我有一个预先存在的Ubuntu20.04安装在WSL 2上,Docker在Windows上运行,启用了WSL 2集成。我运行了docker run -it --rm --gpus all ubuntu nvidia-smi,它显示了我的GPU。
发布于 2021-08-13 20:21:51
由https://docs.docker.com/docker-for-windows/wsl/
它适用于我的win10码头3.6..。
https://stackoverflow.com/questions/65295415
复制相似问题