lipsync-docker / setup_local.sh
naicoi's picture
feature/uv-migration (#6)
8532e19
Raw
History Blame Contribute Delete
1.31 kB
#!/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"