#!/bin/bash set -e echo "🚀 Setting up OutofLipSync with uv (local development)..." # Check if uv is installed if ! command -v uv &> /dev/null; then echo "📦 Installing uv..." curl -LsSf https://astral.sh/uv/install.sh | sh export PATH="$HOME/.cargo/bin:$PATH" fi echo "🔧 Creating virtual environment..." uv venv # Detect OS OS="$(uname -s)" ARCH="$(uname -m)" if [[ "$OS" == "Darwin" && "$ARCH" == "arm64" ]]; then echo "⚠️ macOS ARM64 detected" echo "📦 Installing minimal dependencies (GPU packages not supported on macOS ARM64)..." uv pip install -r requirements_minimal.txt echo "" echo "⚠️ WARNING: The following packages cannot be installed on macOS ARM64:" echo " - triton (GPU compute)" echo " - onnxruntime-gpu (GPU inference)" echo " - decord (video processing)" echo " - flash-attn-3 (attention mechanism)" echo "" echo " Full ML functionality is NOT available on macOS." echo " For testing, use HuggingFace Spaces (Linux GPU environment)." else echo "📥 Installing all dependencies from requirements.txt..." uv pip install -r requirements.txt fi echo "" echo "✅ Setup complete!" echo "🎉 Run app with: uv run python app.py" echo " Or: source .venv/bin/activate && python app.py"