Upload install.sh
Browse files- install.sh +85 -3
install.sh
CHANGED
|
@@ -1,6 +1,88 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
#sudo apt install software-properties-common
|
| 3 |
-
#sudo add-apt-repository ppa:deadsnakes/ppa
|
| 4 |
|
| 5 |
-
|
|
|
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
#!/bin/bash
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
# 1 2 3 4 ..
|
| 4 |
+
CHECKPOINT=$1
|
| 5 |
|
| 6 |
+
# 1 2 3 4 5 ..
|
| 7 |
+
RC=$2
|
| 8 |
+
|
| 9 |
+
cd /workspace/firstContainer
|
| 10 |
+
mkdir -p tmp
|
| 11 |
+
rm -rf README.md
|
| 12 |
+
rm -rf s
|
| 13 |
+
rm -rf ss.sh
|
| 14 |
+
|
| 15 |
+
apt-get update
|
| 16 |
+
sudo apt install -y python3.10
|
| 17 |
+
sudo apt-get install -y python3.10-distutils
|
| 18 |
+
sudo apt-get install git-lfs
|
| 19 |
+
apt-get -y install rsync
|
| 20 |
+
|
| 21 |
+
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
|
| 22 |
+
python3.10 -m pip install --upgrade pip
|
| 23 |
+
python3.10 -m pip install setuptools
|
| 24 |
+
python3.10 -m pip install requests
|
| 25 |
+
python3.10 -m pip install wget
|
| 26 |
+
python3.10 -m pip install gdown
|
| 27 |
+
python3.10 -m pip install natsort
|
| 28 |
+
python3.10 -m pip install httpcore
|
| 29 |
+
python3.10 -m pip install httpx==0.24.1
|
| 30 |
+
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
|
| 31 |
+
git config --global user.name "anonymous"
|
| 32 |
+
git config --global user.email my@gmail.com
|
| 33 |
+
git lfs install --force
|
| 34 |
+
sudo apt update && sudo apt install -y libgl1-mesa-glx
|
| 35 |
+
sudo apt autoremove && sudo apt clean
|
| 36 |
+
|
| 37 |
+
cd /workspace/firstContainer/SD
|
| 38 |
+
mkdir -p embeddings
|
| 39 |
+
\cp -f run.sh "../run.sh"
|
| 40 |
+
\cp -f pOut.py "../pOut.py"
|
| 41 |
+
\cp -f out.sh "../out.sh"
|
| 42 |
+
\cp -f gc.sh "../gc.sh"
|
| 43 |
+
\cp -f forcePull.sh "../forcePull.sh"
|
| 44 |
+
\cp -f myRun.ipynb "../myRun.ipynb"
|
| 45 |
+
git gc
|
| 46 |
+
git clone https://huggingface.co/zuv0/models
|
| 47 |
+
cd models
|
| 48 |
+
\cp -f config_go3.json "../config.json"
|
| 49 |
+
\cp -f ui-config_go3.json "../ui-config.json"
|
| 50 |
+
rsync -r "embeddings/" "../embeddings/"
|
| 51 |
+
rsync -r "extensions/" "../extensions/"
|
| 52 |
+
\mv -f /workspace/firstContainer/SD/repositories/BLIP/_git /workspace/firstContainer/SD/repositories/BLIP/.git
|
| 53 |
+
\mv -f /workspace/firstContainer/SD/repositories/CodeFormer/_git /workspace/firstContainer/SD/repositories/CodeFormer/.git
|
| 54 |
+
\mv -f /workspace/firstContainer/SD/repositories/generative-models/_git /workspace/firstContainer/SD/repositories/generative-models/.git
|
| 55 |
+
\mv -f /workspace/firstContainer/SD/repositories/k-diffusion/_git /workspace/firstContainer/SD/repositories/k-diffusion/.git
|
| 56 |
+
\mv -f /workspace/firstContainer/SD/repositories/stable-diffusion-stability-ai/_git /workspace/firstContainer/SD/repositories/stable-diffusion-stability-ai/.git
|
| 57 |
+
cd /workspace/firstContainer/SD/extensions/sd-webui-controlnet/annotator/oneformer/oneformer/data
|
| 58 |
+
curl -L -O https://github.com/Mikubill/sd-webui-controlnet/blob/main/annotator/oneformer/oneformer/data/bpe_simple_vocab_16e6.txt.gz
|
| 59 |
+
|
| 60 |
+
cd /workspace/firstContainer/SD/models/Stable-diffusion
|
| 61 |
+
case $CHECKPOINT in
|
| 62 |
+
1)
|
| 63 |
+
wget -N https://huggingface.co/zuv0/test/resolve/main/petitcutie_v20.safetensors
|
| 64 |
+
;;
|
| 65 |
+
2)
|
| 66 |
+
wget -N https://huggingface.co/zuv0/test/resolve/main/milkTea_p.safetensors
|
| 67 |
+
;;
|
| 68 |
+
3)
|
| 69 |
+
wget -N https://huggingface.co/JosefJilek/loliDiffusion/resolve/main/loliDiffusionV0.14.0_RabbitV7_1.0M6-CLIP_VAE_FP16.safetensors
|
| 70 |
+
;;
|
| 71 |
+
4)
|
| 72 |
+
wget -N https://huggingface.co/zuv0/test/resolve/main/lemonmixV2_v30.safetensors
|
| 73 |
+
;;
|
| 74 |
+
*)
|
| 75 |
+
echo "CHECKPOINT error!"
|
| 76 |
+
;;
|
| 77 |
+
esac
|
| 78 |
+
|
| 79 |
+
git clone https://huggingface.co/zuv0/RC$RC
|
| 80 |
+
cd RC$RC
|
| 81 |
+
git repack -a -d --depth=250 --window=250
|
| 82 |
+
cd .git
|
| 83 |
+
rm -rf lfs
|
| 84 |
+
|
| 85 |
+
cd /workspace/firstContainer
|
| 86 |
+
python3.10 ./SD/launch.py --reinstall-torch --opt-sdp-attention --no-download-sd-model --exit
|
| 87 |
+
pip cache purge
|
| 88 |
+
sudo apt clean
|