-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
This comprehensive guide covers all installation methods for AI Education Pilot.
- CPU: 2 cores
- RAM: 4 GB
- Storage: 10 GB free space
- OS: Windows 10+, macOS 10.15+, Linux (Ubuntu 20.04+)
- CPU: 4+ cores
- RAM: 8+ GB
- Storage: 20+ GB free space (SSD recommended)
- OS: Latest stable versions
macOS (using Homebrew):
brew install nodeWindows (using Chocolatey):
choco install nodejsLinux (Ubuntu/Debian):
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejsVerify installation:
node --version # Should show v18.0.0 or higher
npm --versionmacOS:
brew install python@3.10Windows: Download from python.org or use Chocolatey:
choco install pythonLinux (Ubuntu/Debian):
sudo apt update
sudo apt install python3.10 python3.10-venv python3-pipVerify installation:
python3 --version # Should show 3.10 or higher
pip3 --versionmacOS:
brew install postgresql@15
brew services start postgresql@15Windows: Download installer from postgresql.org
Linux (Ubuntu/Debian):
sudo apt update
sudo apt install postgresql postgresql-contrib
sudo systemctl start postgresql
sudo systemctl enable postgresqlCreate database:
# Access PostgreSQL
sudo -u postgres psql
# Create database and user
CREATE DATABASE ai_pilot;
CREATE USER ai_pilot_user WITH PASSWORD 'your_secure_password';
GRANT ALL PRIVILEGES ON DATABASE ai_pilot TO ai_pilot_user;
\qmacOS:
brew install gitWindows: Download from git-scm.com
Linux:
sudo apt install gitgit clone https://github.com/All-Pilot-Modules/ai-pilot.git
cd ai-pilotcd Backend
# Create virtual environment
python3 -m venv venv
# Activate virtual environment
# macOS/Linux:
source venv/bin/activate
# Windows:
venv\Scripts\activate
# Install dependencies
pip install -r requirements.txtCreate .env file in Backend/ directory:
# Database Configuration
DATABASE_URL=postgresql://ai_pilot_user:your_secure_password@localhost:5432/ai_pilot
# OpenAI Configuration
OPENAI_API_KEY=sk-your-api-key-here
OPENAI_MODEL=gpt-4
# JWT Configuration
SECRET_KEY=your-secret-key-here-use-random-string
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
# Server Configuration
PORT=8000
HOST=0.0.0.0
ENVIRONMENT=development
# CORS
CORS_ORIGINS=["http://localhost:3000"]
# File Upload
MAX_FILE_SIZE=10485760 # 10MB in bytes
UPLOAD_DIR=uploads
# RAG Configuration
PINECONE_API_KEY=your-pinecone-key-here
PINECONE_ENVIRONMENT=your-pinecone-env
PINECONE_INDEX_NAME=ai-pilot-docs# Run migrations
alembic upgrade head
# Or manually create tables
python -c "from app.database import Base, engine; Base.metadata.create_all(bind=engine)"Open a new terminal:
cd Frontend
# Install dependencies
npm install
# Or use yarn
yarn installCreate .env.local file in Frontend/ directory:
# API Configuration
NEXT_PUBLIC_API_URL=http://localhost:8000
# Application
NEXT_PUBLIC_APP_NAME=AI Education Pilot
NEXT_PUBLIC_APP_VERSION=1.0.0
# Features
NEXT_PUBLIC_ENABLE_AI_FEEDBACK=true
NEXT_PUBLIC_ENABLE_ANALYTICS=trueBackend (in Backend directory):
source venv/bin/activate # If not already activated
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000Frontend (in Frontend directory):
npm run dev
# Or
yarn devAccess the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- API Docs: http://localhost:8000/docs
- Docker Desktop installed
- Docker Compose installed
git clone https://github.com/All-Pilot-Modules/ai-pilot.git
cd ai-pilotCreate .env file in root directory:
# Database
POSTGRES_USER=ai_pilot_user
POSTGRES_PASSWORD=your_secure_password
POSTGRES_DB=ai_pilot
# OpenAI
OPENAI_API_KEY=sk-your-api-key-here
# JWT
SECRET_KEY=your-secret-key-here
# App
NEXT_PUBLIC_API_URL=http://localhost:8000docker-compose up --buildAccess services:
- Frontend: http://localhost:3000
- Backend: http://localhost:8000
- PostgreSQL: localhost:5432
docker-compose downFor production deployment, see:
SECRET_KEY (JWT signing):
python -c "import secrets; print(secrets.token_urlsafe(32))"Database Password:
python -c "import secrets; print(secrets.token_urlsafe(16))"- Never commit
.envfiles to Git - Use different keys for development and production
- Rotate keys regularly
- Use environment-specific configurations
- Enable HTTPS in production
curl http://localhost:8000/health
# Should return: {"status": "healthy"}Open browser to http://localhost:3000
- Should see the landing page
- No console errors
# Access PostgreSQL
psql -U ai_pilot_user -d ai_pilot
# List tables
\dt
# Should see tables: users, modules, tests, etc.
\qError: Address already in use: 8000
Solution:
# Find process using port
lsof -i :8000 # macOS/Linux
netstat -ano | findstr :8000 # Windows
# Kill process
kill -9 <PID> # macOS/Linux
taskkill /PID <PID> /F # WindowsError: could not connect to server
Solution:
# Check PostgreSQL is running
brew services list # macOS
sudo systemctl status postgresql # Linux
# Restart PostgreSQL
brew services restart postgresql # macOS
sudo systemctl restart postgresql # LinuxError: ModuleNotFoundError: No module named 'fastapi'
Solution:
# Ensure virtual environment is activated
source venv/bin/activate
# Reinstall dependencies
pip install -r requirements.txtError: Cannot find module 'next'
Solution:
# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm install- Sign up at pinecone.io
- Create an index
- Add credentials to
.env:
PINECONE_API_KEY=your-key
PINECONE_ENVIRONMENT=your-env
PINECONE_INDEX_NAME=ai-pilot-docs# Install Redis
brew install redis # macOS
sudo apt install redis-server # Linux
# Start Redis
brew services start redis # macOS
sudo systemctl start redis # LinuxAfter installation:
- Getting Started Guide - First steps with AI Pilot
- Configuration Guide - Detailed configuration options
- User Manual - Learn all features
- Troubleshooting - Fix common issues
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: support@aipilot.education (if configured)
Installation complete? π Head to the Getting Started Guide!