Files
ai-6gb-gpu/update.sh
T
Outis f3add65850 Add update script for Docker image management
This script updates Docker images, restarts containers, and cleans up old image layers.
2026-06-01 09:25:22 -04:00

31 lines
735 B
Bash

#!/usr/bin/env bash
# ~/docker/ai-image-gen/update.sh
#
# Run this manually when you have a specific reason to update.
# Models and outputs are in named volumes — they are never touched.
#
# Usage:
# chmod +x update.sh (once)
# ./update.sh (when you want to update)
set -euo pipefail
cd "$(dirname "$0")"
echo "==> Pulling latest images..."
docker compose pull
echo ""
echo "==> Restarting containers with new images..."
docker compose up -d --force-recreate
echo ""
echo "==> Cleaning up old image layers..."
docker image prune -f
echo ""
echo "==> Done. Services:"
echo " Forge → http://localhost:7860"
echo " InvokeAI → http://localhost:9090"
echo ""
echo " Watch logs: docker compose logs -f"