#!/bin/bash set -e # Exit immediately if a command fails echo "🔧 Upgrading pip, setuptools, and wheel to modern versions..." python -m pip install --upgrade --no-cache-dir "pip==23.2.1" setuptools wheel # Confirm versions PIP_CMD=$(which pip) echo "🐍 Python version: $(python --version)" echo "📦 Pip version: $($PIP_CMD --version)" echo "⚡️ Installing optional build tool 'ninja'..." $PIP_CMD install --no-cache-dir ninja echo "📦 Installing standard dependencies..." $PIP_CMD install --no-cache-dir \ insightface \ git+https://github.com/facebookresearch/sam2.git \ git+https://github.com/facebookresearch/segment-anything.git \ git+https://github.com/xinyu1205/recognize-anything.git \ git+https://github.com/martin-chobanyan-sdc/RAFT.git echo "📥 Installing GroundingDINO from PyPI package groundingdino-py..." $PIP_CMD install --no-cache-dir groundingdino-py echo "✅ All dependencies installed successfully."