由于需要在win下部署tfserving, 故找到使用wsl方法,资料如下:
手动安装NVIDIA Drivers for CUDA on WSL
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.4.2/local_installers/cuda-repo-wsl-ubuntu-11-4-local_11.4.2-1_amd64.deb
sudo dpkg -i cuda-repo-wsl-ubuntu-11-4-local_11.4.2-1_amd64.deb
sudo apt-key add /var/cuda-repo-wsl-ubuntu-11-4-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda
问题1:
service network-manager restart
问题2:
下载容器失败--手动下载安装
Failed to fetch https://nvidia.github.io/libnvidia-container/experimental/ubuntu18.04/amd64/InRelease Could not connect to nvidia.github.io
[Could not connect to nvidia.github.io](https://github.com/NVIDIA/nvidia-docker/issues/1493)
![在这里插入图片描述](https://img-blog.csdnimg.cn/1e185c7dfeac43afa10d3451bcd8d814.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBA6Iu55qaG5p6r,size_20,color_FFFFFF,t_70,g_se,x_16)
I solved the problem by the following method.
Download the latest "libnvidia-container1" from the following URL.
(ex) libnvidia-container1_1.4.0-1_amd64.deb
"https://github.com/NVIDIA/libnvidia-container/tree/gh-pages/stable/ubuntu18.04/amd64"
Run "dpkg -i libnvidia-container1_1.4.0-1_amd64.deb"
Run "sudo apt install libnvidia-container 1"
(This seems to install nvidia-docker2)
Confirmation method
Run "sudo systemctl restart docker"
Run "sudo docker run --rm --gpus all nvidia / cuda: 11.0-base nvidia-smi"
If the same screen as "nvidia-smi" appears, it is a success.
手动下载以下dep
```bash
libnvidia-container-tools_1.5.0_rc.1-1_amd64.deb
libnvidia-container1_1.4.0-1_amd64.deb
libnvidia-container1_1.5.0_rc.1-1_amd64.deb
nvidia-container-runtime_3.5.0-1_amd64.deb
nvidia-container-toolkit_1.5.1-1_amd64.deb
nvidia-docker2_2.6.0-1_all.deb
wsl系统下无法启动docker
windows子系统 * Docker is not running问题
解决方法
Windows 子系统 Ubuntu 启动Docker失败
docker版本
docker run hello-world异常
2021.9.28
docker 装了19版本的,但调用gpu还是失败。暂无解决…
可能存在问题:cuda调用失败、docker版本不匹配、win server2019的wsl不适配