Created
November 26, 2023 17:48
-
-
Save pgrzesiecki/a63865d1a23ae218cf4118cd94ae487c to your computer and use it in GitHub Desktop.
stable-diffusion-server-provision
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo apt update | |
sudo apt -y upgrade | |
sudo apt install -y curl git | |
sudo apt install -y liblzma-dev libssl-dev libffi-dev libncurses5-dev zlib1g zlib1g-dev libreadline-dev libbz2-dev libsqlite3-dev make gcc google-perftools | |
# ONLY WHEN ROOT START (WebUI must be run from regular account, not root, so we need to create one) | |
password="MyTestPasswordHere123" | |
username="customuser" | |
pass=$(perl -e 'print crypt($ARGV[0], "password")' $password) | |
useradd -m -p "$pass" "$username" | |
usermod --shell /usr/bin/bash customuser | |
su - customuser | |
# ONLY WHEN ROOT END | |
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.13.1 | |
echo ". \"$HOME/.asdf/asdf.sh\"" >> ~/.bashrc | |
echo ". \"$HOME/.asdf/completions/asdf.bash\"" | |
source ~/.bashrc | |
asdf plugin-add python | |
asdf install python 3.10.12 | |
asdf global python 3.10.12 | |
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git ~/stable-diffusion-webui | |
cd ~/stable-diffusion-webui | |
./webui.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment