From c45dfad9e8f740b6126d52b7055822e0f4d18a5e Mon Sep 17 00:00:00 2001 From: crowetic Date: Sat, 17 May 2025 14:23:40 -0700 Subject: [PATCH] added restart script --- restart-ai-stack.sh | 30 ++++++++++++++++++++++++++++++ setup-ai-stack.sh | 1 + 2 files changed, 31 insertions(+) create mode 100644 restart-ai-stack.sh diff --git a/restart-ai-stack.sh b/restart-ai-stack.sh new file mode 100644 index 0000000..84b05ae --- /dev/null +++ b/restart-ai-stack.sh @@ -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." diff --git a/setup-ai-stack.sh b/setup-ai-stack.sh index 0a3d137..937204b 100644 --- a/setup-ai-stack.sh +++ b/setup-ai-stack.sh @@ -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"