需要显卡基于Ubuntu20.04安装输入nvidia-smi有输出,可以查看cuda的版本
一.安装miniconda
1.下载最新的安装文件。在命令行中输入以下命令即可:
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
2.执行下载好的文件
./Miniconda3-latest-Linux-x86_64.sh
3.在交互提示中不断输入
Enter 或者 yes
4.安装完成后
Source .bashr
5.搭建python虚拟环境
使用conda创建虚拟环境sdwebui,使用的python版本为3.10.9(stable-diffusion-webui用的python版本为3.10.6)
conda create -n sdwebui python==3.10.9
激活环境
conda activate sdwebui
6.升级pip并更改默认库包下载地址为清华镜像
python -m pip install --upgrade pip
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple