|
#!/bin/bash |
|
|
|
cd /workspace |
|
|
|
|
|
if dpkg-query -W libgl1 2>/dev/null | grep -q "libgl1"; then |
|
echo -n "" |
|
else |
|
echo "libgl1 is not installed. Installing..." |
|
apt update |
|
apt install -yq libgl1 |
|
fi |
|
|
|
python /workspace/SD/launch.py --port 7860 --api --theme dark --allow-code --enable-insecure-extension-access --listen --share --always-high-vram --disable-safe-unpickle --cuda-malloc --cuda-stream --pin-shared-memory |
|
|
|
kill $! |
|
kill -9 $(ps -ef | grep 'ngrok' | grep -v 'grep' | awk '{print $2}') |
|
deactivate |
|
echo "stopped" |
|
|