#!/bin/bash # Setup script for AI Engine dependencies echo "🚀 Setting up AI Engine dependencies..." # Upgrade pip, setuptools, wheel echo "📦 Upgrading pip, setuptools, wheel..." pip install --upgrade pip setuptools wheel # Install dependencies one by one to handle version conflicts echo "📦 Installing core dependencies..." pip install fastapi==0.104.1 uvicorn==0.24.0 pip install sqlalchemy==2.0.23 psycopg2-binary==2.9.9 pip install pydantic==2.5.0 pydantic-settings pip install python-jose[cryptography]==3.3.0 pip install passlib[bcrypt]==1.7.4 pip install python-multipart==0.0.6 pip install requests==2.31.0 pip install beautifulsoup4==4.12.2 # Install numpy first (compatible version for Python 3.12) echo "📦 Installing numpy (Python 3.12 compatible)..." pip install "numpy>=1.26.0" echo "📦 Installing scikit-learn..." pip install "scikit-learn>=1.3.0" echo "📦 Installing NLTK..." pip install nltk==3.8.1 echo "📦 Installing OpenAI..." pip install openai==1.3.7 echo "📦 Installing other dependencies..." pip install playwright==1.40.0 pip install redis==5.0.1 pip install celery==5.3.4 pip install alembic==1.13.1 pip install sentry-sdk[fastapi]==1.38.0 pip install prometheus-client==0.19.0 pip install python-dotenv==1.0.0 # AI Engine upgrades echo "🤖 Installing AI Engine packages..." pip install rank-bm25==0.2.2 pip install faiss-cpu==1.7.4 pip install sentence-transformers==2.2.2 pip install transformers==4.35.0 # Install PyTorch (CPU version, compatible with Python 3.12) echo "📦 Installing PyTorch..." pip install torch>=2.0.0 --index-url https://download.pytorch.org/whl/cpu echo "📦 Installing TextBlob and APScheduler..." pip install textblob==0.17.1 pip install apscheduler==3.10.4 echo "✅ Installation complete!" echo "" echo "Next steps:" echo "1. Run: python3 add_handoff_fields.py" echo "2. Add OPENAI_API_KEY to .env file" echo "3. Start the server: uvicorn app.main:app --reload"