-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinstall-script.sh
executable file
·51 lines (38 loc) · 1.49 KB
/
install-script.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# Variables
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
LINE_BREAK="-------------------------------------------------"
DIVIDER="- - - - - - - - - - - - - - - - - - - - - - - - -"
ERROR="Error: "
KOHYA_SIZE=8464258703 # Default install sizes for later use
CUDA_SIZE=5234919743
A1111_SIZE=0
FORGE_SIZE=0
COMFY_SIZE=0
# Check if system is Ubuntu based, otherwise it won't work
printf "Install script for Stable diffusion Generating/Training | Created by TheElevatedOne"
printf "\n$LINE_BREAK\n"
if ! grep -q "Ubuntu" <<< "$(uname -a)]"
then
printf "$ERROR Distribution not based on Ubuntu,\n Script cannot continue.\n"
exit 1
fi
# Basic update & Installation of python, libgl1 (which is required in WebUIs),
# google-perftools for TCMalloc, zip and unzip for basic workflow
printf "Updating system"
sudo apt update && sudo apt upgrade -y
printf "\n$LINE_BREAK\n"
printf "Installing required packages"
sudo apt install -y python3 python3-pip python3-venv python3-tk libgl1 google-perftools zip unzip
# Get which software to be installed
printf "\n$LINE_BREAK\n"
read -p "Install WebUI (default = no) [Y/n]: " webui_bool
if [ "${webui_bool^^}" = "Y" ]
then
printf "$DIVIDER\n"
read -p "Install A1111 (1) or Forge (2) [1|2; Type number or Just press ENTER for None]: " WEBUI
fi
printf "$LINE_BREAK\n"
read -p "Install ComfyUI (default = no) [Y/n]: " comfy_bool
printf "$LINE_BREAK\n"
read -p "Install Kohya_SS (default = no) [Y/n]: " kohya_bool