Download SD_install.sh from Alishen/Ubuntu-LTS20.04-Python3.10: direct link, hf CLI and curl.
- Browser
- Download file 1.66 kB
-
https://huggingface.co/Alishen/Ubuntu-LTS20.04-Python3.10/resolve/main/SD_install.sh
- Command line
-
hf download hf://Alishen/Ubuntu-LTS20.04-Python3.10/SD_install.sh
-
curl -L -o SD_install.sh https://huggingface.co/Alishen/Ubuntu-LTS20.04-Python3.10/resolve/main/SD_install.sh
1.66 kB
| # Update and upgrade system packages | |
| sudo apt update && sudo apt upgrade -y | |
| # Remove unused packages | |
| sudo apt autoremove -y | |
| # Install software-properties-common | |
| sudo apt install software-properties-common -y | |
| # Add deadsnakes PPA | |
| sudo add-apt-repository ppa:deadsnakes/ppa -y | |
| # Install Python 3.10 | |
| sudo apt install python3.10 | |
| # Clone the stable-diffusion-webui repository | |
| git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui | |
| # Install google-perftools | |
| sudo apt install -y google-perftools | |
| # Check python versions | |
| python --version | |
| python3 --version | |
| # Set up python alternatives | |
| sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.8 2 | |
| sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 | |
| # Automatically select Python 3.10 for /usr/bin/python | |
| echo 1 | sudo update-alternatives --config python | |
| # Set up python3 alternatives | |
| sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 2 | |
| sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 | |
| # Automatically select Python 3.10 for /usr/bin/python3 | |
| echo 1 | sudo update-alternatives --config python3 | |
| # Check python versions again | |
| python3 --version | |
| python --version | |
| # Install python3.10 development and venv packages | |
| sudo apt install python3.10-dev python3.10-venv | |
| # Navigate to the cloned directory | |
| cd stable-diffusion-webui/ | |
| # Update webui-user.sh using sed | |
| sed -i 's/#export COMMANDLINE_ARGS=""/export COMMANDLINE_ARGS="--xformers"/' webui-user.sh | |
| # Ensure the webui-user.sh script is executable | |
| chmod +x webui-user.sh | |
| # Execute the webui-user.sh script | |
| ./webui-user.sh | |