#!/bin/bash cd /workspace mkdir -p tmp rm -rf README.md rm -rf s rm -rf ss.sh \cp -f /workspace/SD/e /workspace/e \cp -f /workspace/SD/run_rp.sh /workspace/run.sh \cp -f /workspace/SD/out_rp.sh /workspace/out.sh \cp -f /workspace/SD/forcePull_rp.sh /workspace/forcePull.sh \cp -f /workspace/SD/gc.sh /workspace/gc.sh \cp -f /workspace/SD/MyRP.ipynb /workspace/MyRP.ipynb kill -9 $(ps -ef | grep 'relauncher.py' | grep -v 'grep' | awk '{print $2}') kill -9 $(ps -ef | grep 'webui' | grep -v 'grep' | awk '{print $2}') kill -9 $(ps -ef | grep 'launch.py' | grep -v 'grep' | awk '{print $2}') rm -rf /workspace/stable-diffusion-webui apt -y update -qq apt-get install git-lfs apt-get -y install rsync apt-get -y install zip """ curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash """ git lfs install --force cd /workspace/SD curl -L -O https://huggingface.co/zuv0/test/resolve/main/SDXLRF115T.tar tar -xf SDXLRF115T.tar rm -rf SDXLRF115T.tar git clone https://huggingface.co/zuv0/modelsXL models cd /workspace/SD/models git fetch --all git reset --hard origin/main git pull rsync -r "embeddings/" "../embeddings/" git repack -a -d --depth=250 --window=250 cd .git rm -rf lfs cd /workspace/SD curl -L -O https://huggingface.co/zuv0/SDXLF17/resolve/main/downs.sh sh downs.sh $1 0 pip3 install pcloud """ pip uninstall -y setuptools pip install setuptools==69.5.1 pip uninstall -y matplotlib pip install matplotlib==3.8.4 pip uninstall -y xformers pip uninstall -y torchaudio pip install torch==2.3.0 torchvision --index-url https://download.pytorch.org/whl/cu121 pip3 install -r requirements_versions.txt --extra-index-url https://download.pytorch.org/whl/cu121 pip3 install -r extensions-builtin/sd_forge_controlnet/requirements.txt pip3 install -r extensions-builtin/forge_legacy_preprocessors/requirements.txt #pip3 install insightface pip3 uninstall -y onnxruntime pip3 install onnxruntime-gpu pip install pydantic==1.10.11 #apt install libgl1 -yq apt-get install -y libgl1-mesa-glx #apt -y install -qq aria2 libcairo2-dev pkg-config python3-dev """ #python3 -c "from launch import prepare_environment; prepare_environment()" --skip-torch-cuda-test cd /workspace python3 /workspace/SD/launch.py --no-download-sd-model --exit apt-get clean pip cache purge kill -9 $(ps -ef | grep 'relauncher.py' | grep -v 'grep' | awk '{print $2}') kill -9 $(ps -ef | grep 'webui' | grep -v 'grep' | awk '{print $2}') kill -9 $(ps -ef | grep 'launch.py' | grep -v 'grep' | awk '{print $2}') rm -rf /workspace/stable-diffusion-webui cd /workspace echo " -----===== =====----- " echo " Install Done." echo " -----===== =====----- "