以下为失败的记录,成功方法直接跳到末尾。
环境
说明:
深度apt 源中无法直接安装nvidia-docker
下载源码
github地址:
GitHub - NVIDIA/nvidia-docker: Build and run Docker containers leveraging NVIDIA GPUs
下载最新release
https://github.com/NVIDIA/nvidia-docker/archive/refs/tags/v2.13.0.tar.gz
编译
tar -xvf nvidia-docker-2.13.0.tar.gz
cd nvidia-docker-2.13.0
使用国内源
新建文件:ubuntu20.04.sources.list
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
修改dockerfile,新增一行
为节约时间,只编译ubuntu20.04版本
make
make LIB_VERSION=2.13.0 LIB_TAG=nvidia-docker TOOLKIT_VERSION=2.13.0 TOOLKIT_TAG=nvidia-docker
输出
安装(失败)
nvidia-container-toolkit
https://github.com/NVIDIA/nvidia-container-toolkit/archive/refs/tags/v1.13.1.tar.gz
同样的操作,只编译ubuntu20.04
再次安装
未安装软件包 libnvidia-container-tools
libnvidia-container
https://github.com/NVIDIA/libnvidia-container/archive/refs/tags/v1.13.1.tar.gz
git clone --depth=1 https://github.com/NVIDIA/libnvidia-container
失败undefined: unsafe.Slice
解决:升级go,采用1.18.0, 下载地址:
https://github.com/golang/go/archive/refs/tags/go1.18.10.tar.gz
cd Downloads/src/go-go1.18.10/src
sh make.bash
cp ..
sudo cp bin/go* /usr/local/bin
新错误
被墙住了
从github上下载
git clone https://github.com/elftoolchain/elftoolchain.git
手动复制到制定目录
故障依旧。。。
-----------------------------------------
参考资料
Installation Guide — NVIDIA Cloud Native Technologies documentation
最终解决
参考
Deepin 安装 NVIDIA-Docker_its_onion的博客-CSDN博客
ldcache error: open failed: /sbin/ldconfig.real: no such file or directory\\n\""": unknown. doc... - 简书
成功了
启动Stable Diffusion WebUI
docker run --gpus all -it -p 8888:8888 -p 7860:7860 -p 6666:22 --name ayanami --ipc=host darkroot1234/ayanami:latest
访问http://127.0.0.1:7860/
gpu内存不足
图片尺寸放小点,用简单参数AI画图
文章来源:https://www.toymoban.com/news/detail-579416.html
文章来源地址https://www.toymoban.com/news/detail-579416.html
到了这里,关于深度linux社区版 20.8 安装 nvidia-docker,启动Stable Diffusion WebUI docker 容器的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!