chore: minimal refactoring
All checks were successful
Build and Push RunPod Docker Image / build-and-push (push) Successful in 1m26s

This commit is contained in:
2025-11-27 11:51:21 +01:00
parent d625bf1c23
commit 69bf6af419
2 changed files with 47 additions and 41 deletions

View File

@@ -86,45 +86,10 @@ references:
scripts:
setup: |
arty deps
arty setup/tailscale
arty setup/services
arty setup/comfyui
arty models/download
arty models/link
arty supervisor/start
setup/tailscale: |
echo "========================================="
echo " Setting up tailscale"
echo "========================================="
echo ""
if [ ! "$TAILSCALE_AUTHKEY" ]; then
echo " ⚠ Tailscale disabled (no TAILSCALE_AUTHKEY in env)"
echo " Services requiring VPN connectivity will not work"
exit 1
fi
echo " Starting Tailscale daemon..."
tailscaled --tun=userspace-networking --socks5-server=localhost:1055 &
sleep 3
echo " Connecting to Tailscale network..."
HOSTNAME="runpod-ai-orchestrator"
tailscale up --authkey="$TAILSCALE_AUTHKEY" --advertise-tags=tag:gpu --hostname="$HOSTNAME" || {
echo " ⚠ Tailscale connection failed, continuing without VPN"
}
# Get Tailscale IP if connected
TAILSCALE_IP=$(tailscale ip -4 2>/dev/null || echo "not connected")
if [ "$TAILSCALE_IP" == "not connected" ]; then
echo " ⚠ Tailscale failed to obtain IP"
exit 1
fi
echo " ✓ Tailscale connected"
echo " Hostname: $HOSTNAME"
echo " IP: $TAILSCALE_IP"
setup/services: |
echo "========================================="
@@ -227,6 +192,39 @@ scripts:
artifact_civitai_download.sh link -c ./models/models_civitai.yaml --cache-dir $PWD/.cache/civitai --output-dir ./services/comfyui/models
artifact_huggingface_download.sh link -c ./models/models_huggingface.yaml --cache-dir $PWD/.cache/huggingface --output-dir ./services/comfyui/models
tailscale/start: |
echo "========================================="
echo " Starting tailscale"
echo "========================================="
echo ""
if [ ! "$TAILSCALE_AUTHKEY" ]; then
echo " ⚠ Tailscale disabled (no TAILSCALE_AUTHKEY in env)"
echo " Services requiring VPN connectivity will not work"
exit 1
fi
echo " Starting Tailscale daemon..."
tailscaled --tun=userspace-networking --socks5-server=localhost:1055 &
sleep 3
echo " Connecting to Tailscale network..."
HOSTNAME="runpod-ai-orchestrator"
tailscale up --authkey="$TAILSCALE_AUTHKEY" --advertise-tags=tag:gpu --hostname="$HOSTNAME" || {
echo " ⚠ Tailscale connection failed, continuing without VPN"
}
# Get Tailscale IP if connected
TAILSCALE_IP=$(tailscale ip -4 2>/dev/null || echo "not connected")
if [ "$TAILSCALE_IP" == "not connected" ]; then
echo " ⚠ Tailscale failed to obtain IP"
exit 1
fi
echo " ✓ Tailscale connected"
echo " Hostname: $HOSTNAME"
echo " IP: $TAILSCALE_IP"
#
# Supervisor Control Scripts
#

View File

@@ -55,17 +55,25 @@ else
echo " ⏭ Skipping"
fi
# [5/7] Setting up tailscale
echo "[5/7] Starting tailscale..."
cd "$PWD/orchestrator"
arty tailscale/start
cd -
echo " ✓ Started successfully"
# [6/7] Starting supervisor
echo "[6/7] Starting supervisor..."
cd "$PWD/orchestrator"
arty supervisor/start
cd -
echo " ✓ Started successfully"
# Display connection information
echo ""
echo "========================================"
echo " Container Ready"
echo "========================================"
echo "Services:"
echo " - SSH: port 22"
if [ -n "${TAILSCALE_IP:-}" ] && [ "$TAILSCALE_IP" != "not connected" ]; then
echo " - Tailscale IP: $TAILSCALE_IP"
fi
echo ""
echo "========================================"
# Keep container running