added restart script

This commit is contained in:
crowetic 2025-05-17 14:23:40 -07:00
parent d0cc730469
commit c45dfad9e8
2 changed files with 31 additions and 0 deletions

30
restart-ai-stack.sh Normal file
View File

@ -0,0 +1,30 @@
#!/bin/bash
set -e
echo "🔄 Restarting AI stack containers..."
restart_container() {
local name=$1
if docker container ls -a --format '{{.Names}}' | grep -q "^$name$"; then
echo "🔁 Restarting $name..."
docker restart "$name"
else
echo "$name not found — skipping."
fi
}
# Core tools
restart_container open-webui
restart_container jupyterlab
restart_container comfyui
restart_container whisper
restart_container stable-diffusion
restart_container tg-webui
restart_container localai
# Custom-built
restart_container whispercpp-gpu
restart_container a1111-webui
echo "✅ All available containers restarted."

View File

@ -9,6 +9,7 @@ echo "📦 AI Stack Setup Script"
echo "Log: $LOG_FILE"
echo
docker network inspect ai-stack-net >/dev/null 2>&1 || docker network create ai-stack-net
check_container_running() {
local name="$1"