-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
54 lines (45 loc) · 1.4 KB
/
setup.sh
File metadata and controls
54 lines (45 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# Setup script for Mini Agent Platform
# This script sets up the Python environment and installs dependencies
# Usage: ./setup.sh
set -e
echo "=========================================="
echo "Mini Agent Platform - Setup"
echo "=========================================="
echo ""
# Check Python version
echo "Checking Python version..."
PYTHON_VERSION=$(python3 --version 2>&1 | awk '{print $2}' || python --version 2>&1 | awk '{print $2}')
echo " Found Python: $PYTHON_VERSION"
# Check if virtual environment exists
if [ ! -d ".venv" ]; then
echo ""
echo "Creating virtual environment..."
python3 -m venv .venv || python -m venv .venv
echo " Virtual environment created"
else
echo ""
echo "Virtual environment already exists"
fi
# Activate virtual environment
echo ""
echo "Activating virtual environment..."
source .venv/bin/activate || . .venv/Scripts/activate
# Upgrade pip
echo ""
echo "Upgrading pip..."
pip install --upgrade pip
# Install dependencies
echo ""
echo "Installing dependencies..."
pip install -r requirements.txt
echo ""
echo "=========================================="
echo "Setup completed successfully!"
echo "=========================================="
echo ""
echo "Next steps:"
echo " 1. Make sure MySQL is running (use ./run-db.sh or start MySQL manually)"
echo " 2. Run migrations: alembic upgrade head"
echo " 3. Start the application: ./start.sh"
echo ""