Installation Guide
Complete guide for installing and configuring ADAPT-AI in development and production environments.
Installation Methods
Package Installation
Quick installation via pip for immediate use
pip install adapt-ai[full]
Development Setup
Clone repository for development and contributions
git clone https://github.com/perfecxion-ai/adapt-ai.git
Development Installation
1Clone Repository
git clone https://github.com/perfecxion-ai/adapt-ai.git cd adapt-ai
2Create Virtual Environment
# Create virtual environment python -m venv venv # Activate virtual environment # Linux/macOS: source venv/bin/activate # Windows: venv\Scripts\activate
3Install Dependencies
# Install all dependencies including development tools pip install -r requirements-dev.txt # Or install specific components: pip install -r requirements.txt # Core dependencies only pip install -r requirements-ml.txt # Machine learning components pip install -r requirements-test.txt # Testing dependencies
4Database Setup
Start PostgreSQL and Redis services using Docker:
# Start database services make docker-up # Or manually with docker-compose: docker-compose up -d postgres redis # Wait for services to be ready sleep 30 # Initialize database schema alembic upgrade head
5Configure Environment
# Copy environment template cp .env.template .env # Edit configuration (optional - defaults work for development) nano .env
The default configuration works out of the box for development. You only need to modify the .env file for production deployment or custom configurations.
Production Installation
Docker Deployment
# Pull production image docker pull perfecxion/adapt-ai:latest # Run with environment variables docker run -d \ --name adapt-ai \ -p 8000:8000 \ -e ADAPT_API_KEY="your-production-key" \ -e DATABASE_URL="postgresql://..." \ -e REDIS_URL="redis://..." \ perfecxion/adapt-ai:latest
Kubernetes Deployment
# Apply Kubernetes manifests kubectl apply -f k8s/namespace.yaml kubectl apply -f k8s/configmap.yaml kubectl apply -f k8s/secrets.yaml kubectl apply -f k8s/deployment.yaml kubectl apply -f k8s/service.yaml kubectl apply -f k8s/ingress.yaml # Verify deployment kubectl get pods -n adapt-ai kubectl get svc -n adapt-ai
Configuration Reference
Environment Variables
# API Configuration ADAPT_API_KEY=your-api-key-here API_GATEWAY_PORT=8000 DISCOVERY_SERVICE_PORT=8001 # Database Configuration DATABASE_URL=postgresql+asyncpg://postgres:password@localhost:5432/adapt_db REDIS_URL=redis://localhost:6379 # Security Configuration JWT_SECRET_KEY=your-secret-key-change-in-production JWT_EXPIRATION_HOURS=24 ENABLE_CORS=true CORS_ORIGINS=["http://localhost:3000"] # ML System Configuration ML_MODEL_PATH=./models ML_TRAINING_DATA_PATH=./data/training ML_ENABLE_GPU=false ML_BATCH_SIZE=32 # Logging Configuration LOG_LEVEL=INFO LOG_FORMAT=json ENABLE_METRICS=true # Feature Flags ENABLE_DISCOVERY=true ENABLE_TESTING=true ENABLE_ML_SYSTEM=true ENABLE_WEBSOCKET=true # Performance Configuration MAX_CONCURRENT_WORKERS=10 REQUEST_TIMEOUT_SECONDS=300 CACHE_TTL_SECONDS=3600
System Requirements
Minimum Requirements
- Python 3.11 or higher
- 8GB RAM
- 5GB disk space
- PostgreSQL 14+
- Redis 6+
Recommended for Production
- 16GB+ RAM
- 4+ CPU cores
- 50GB+ SSD storage
- NVIDIA GPU (for ML features)
- Load balancer for HA
Verify Installation
After installation, verify everything is working correctly:
# Check ADAPT-AI version python -c "import adapt_ai; print(adapt_ai.__version__)" # Test API connection adapt-ai test-connection # Run health checks curl http://localhost:8000/health curl http://localhost:8001/health # Run self-test suite adapt-ai self-test --verbose # Check service status adapt-ai status