#!/bin/bash # Print system information echo "=== System Information ===" echo "Python version: $(python3 --version)" echo "CUDA version: $(nvcc --version 2>/dev/null || echo 'NVCC not found')" echo "GPU information: $(nvidia-smi || echo 'NVIDIA-SMI not found')" echo "===========================" # Start ComfyUI in the background cd /app/ComfyUI python3 main.py --listen 0.0.0.0 --port 8188 & COMFY_PID=$! # Wait for ComfyUI to start echo "Starting ComfyUI server..." sleep 10 # Start the web interface cd /app echo "Starting Gradio interface..." python3 app.py # If the Gradio app crashes, kill ComfyUI too kill $COMFY_PID