Docker摆设Stable-Diffusion-webui
<hr> 前排提示:假如不想折腾,可直接跳到末了获取封装好的容器,一键运行 :D<hr> 前言
乘上AI天生的快车,一同看看沿途的风景。
启一个miniconda容器
docker run -itd -v 宿主机内SD项目路径:/tmp --gpus all --ipc host -p 7860:7860 continuumio/miniconda3:latest 打开容器:
docker exec -it 容器id bash
cd /tmp
下载项目代码
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git 注:假如搭了梯子也无法 git clone,可以直接下载 项目.zip 文件,然后在当地解压。
安装依靠
先安装 torch和更新setuptools,否则:在使用pip安装basicsr库的时间卡住在Preparing metadata (setup.py)。
pip install --upgrade pip setuptools wheel
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/你的cuda版本,比如:cu121 上面的 index-url 参考 pytorch 官方:
Start Locally | PyTorch
https://dis.qidao123.com/imgproxy/aHR0cHM6Ly9pLWJsb2cuY3NkbmltZy5jbi9ibG9nX21pZ3JhdGUvOGFmMDgxZDgyMDRmODM1Yjg0Mjk2OGU2N2VkNjRhYzgucG5n
使用清华源安装 requirements_versions.txt :
pip install -r requirements_versions.txt -i https://pypi.tuna.tsinghua.edu.cn/simple 使用阿里源安装 requirements.txt :
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple 注:清华源安装 requirements.txt 会出现报错:
页:
[1]