-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·75 lines (60 loc) · 1.81 KB
/
setup.sh
File metadata and controls
executable file
·75 lines (60 loc) · 1.81 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
# Personal Assistant Setup Script
echo "🔧 Setting up Personal Assistant Application..."
# Check if Python is installed
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 is not installed. Please install Python 3.8+ first."
exit 1
fi
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "❌ Node.js is not installed. Please install Node.js 18+ first."
exit 1
fi
# Check if npm is installed
if ! command -v npm &> /dev/null; then
echo "❌ npm is not installed. Please install npm first."
exit 1
fi
echo "✅ Prerequisites check passed"
# Setup Backend
echo "📦 Setting up backend..."
# Create virtual environment
if [ ! -d ".venv" ]; then
echo "Creating Python virtual environment..."
python3 -m venv .venv
echo "✅ Virtual environment created"
else
echo "Virtual environment already exists"
fi
# Activate virtual environment and install dependencies
echo "Installing Python dependencies..."
source .venv/bin/activate
pip install --upgrade pip
cd backend
pip install -r requirements.txt
echo "✅ Backend dependencies installed"
echo "Installing spaCy model..."
python -m spacy download en_core_web_sm
echo "✅ spaCy model installed"
cd ..
# Setup Frontend
echo "📦 Setting up frontend..."
cd frontend
# Install Node.js dependencies
echo "Installing Node.js dependencies..."
npm install
echo "✅ Frontend dependencies installed"
cd ..
echo ""
echo "🎉 Setup completed successfully!"
echo ""
echo "Next steps:"
echo "1. Install Ollama from https://ollama.ai"
echo "2. Start Ollama: ollama serve"
echo "3. Install models: ollama pull phi3-mini"
echo "4. Run the application: ./start.sh"
echo ""
echo "Or run manually:"
echo " Backend: source venv/bin/activate && cd backend && python main.py"
echo " Frontend: cd frontend && npm run dev"