win server2019配置wsl+docker+tfserving失败

由于需要在win下部署tfserving, 故找到使用wsl方法,资料如下:

windows10 + wsl2,使用NVIDIA gpu

WSL2安装及GPU的使用

NVIDIA GPU官方文档

Windows Server 安装指南

手动下载linux子系统

wsl-含wsl子系统各启动命令

手动安装NVIDIA Drivers for CUDA on WSL

Cuda下载
wsl-ubuntu配置cuda

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

环境变量增加cuda

问题1:

ubnatu18.04重启网卡

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不适配

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值