深度linux社区版 20.8 安装 nvidia-docker,启动Stable Diffusion WebUI do

[复制链接]
查看683 | 回复0 | 2023-8-9 10:50:34 | 显示全部楼层 |阅读模式
以下为失败的记录,成功方法直接跳到末尾。
环境



 

 说明:
深度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
编译

  1. tar -xvf nvidia-docker-2.13.0.tar.gz
  2. cd nvidia-docker-2.13.0
复制代码

使用国内源

新建文件:ubuntu20.04.sources.list
  1. deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
  2. deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
  3. deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
  4. deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
  5. deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
  6. deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
  7. deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
  8. deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
复制代码
修改dockerfile,新增一行

为节约时间,只编译ubuntu20.04版本
 make
  1. 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

  1. 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
  1. cd Downloads/src/go-go1.18.10/src
  2. sh make.bash
  3. cp ..
  4. sudo cp bin/go* /usr/local/bin
复制代码

 新错误

 被墙住了
从github上下载
  1. 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
  1. 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://blog.csdn.net/hknaruto/article/details/130634506
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则