sudo apt-get update
sudo apt upgrade
wget https://cn.download.nvidia.com/XFree86/Linux-x86_64/550.100/NVIDIA-Linux-x86_64-550.100.run
sudo apt-get update
sudo apt-get install g++
sudo apt-get install gcc
sudo apt-get install make
sudo apt-get remove --purge nvidia*
sudo vim /etc/modprobe.d/blacklist.conf
blacklist nouveau
options nouveau modeset=0
sudo cat /etc/modprobe.d/blacklist.conf
sudo update-initramfs -u
sudo reboot
sudo chmod 777 NVIDIA-Linux-x86_64-550.100.run
sudo ./NVIDIA-Linux-x86_64-550.100.run
nvidia-smi
wget https://developer.download.nvidia.com/compute/cuda/12.4.0/local_installers/cuda_12.4.0_550.54.14_linux.run
sudo chmod 777 cuda_12.4.0_550.54.14_linux.run
sudo ./cuda_12.4.0_550.54.14_linux.run
sudo vim ~/.bashrc
export PATH="/usr/local/cuda-12.4/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-12.4/lib64:$LD_LIBRARY_PATH"
source ~/.bashrc
nvcc -V
wget -c https://repo.anaconda.com/archive/Anaconda3-2023.03-1-Linux-x86_64.sh
bash Anaconda3-2023.03-1-Linux-x86_64.sh
vim /etc/profile
export PATH="~/anaconda3/bin:$PATH"
vim ~/.bashrc
export PATH="~/anaconda3/bin:$PATH"
source /etc/profile
source ~/.bashrc
conda -V
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --set show_channel_urls yes
pip config set globalThis.index-url https://pypi.tuna.tsinghua.edu.cn/simple
sudo apt-get install libgoogle-perftools4 libtcmalloc-minimal4 -y
conda create -n sd python=3.10.6
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
git clone https://mirror.ghproxy.com/https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
export HF_ENDPOINT=https://hf-mirror.com
echo 'export HF_ENDPOINT="https://hf-mirror.com"' >> ~/.bashrc
source ~/.bashrc
conda activate sd
pip3 install torch==2.1.2 torchvision torchaudio --extra-index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip install -r requirements.txt
./webui.sh --port 15026 --listen --enable-insecure-extension-access --xformers