-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-dependencies.sh
More file actions
executable file
路74 lines (59 loc) 路 1.8 KB
/
Copy pathinstall-dependencies.sh
File metadata and controls
executable file
路74 lines (59 loc) 路 1.8 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
#!/bin/bash
# Installation script for Linux/Mac
# Installs all dependencies for CRM Business Predictor
set -e
echo "========================================"
echo " CRM Business Predictor Setup"
echo " Installing Dependencies"
echo "========================================"
echo
# Check if Python is installed
if ! command -v python3 &> /dev/null; then
echo "ERROR: Python 3 not found! Please install Python 3.8 or higher"
exit 1
fi
echo "[1/4] Python version:"
python3 --version
echo
# Check if Node.js is installed
if ! command -v node &> /dev/null; then
echo "ERROR: Node.js not found! Please install Node.js 16 or higher"
exit 1
fi
echo "[2/4] Node.js version:"
node --version
echo
# Install frontend dependencies
echo "[3/4] Installing frontend dependencies..."
npm install
echo "Frontend dependencies installed successfully!"
echo
# Install backend dependencies
echo "[4/4] Installing backend dependencies..."
cd backend
# Check if virtual environment exists
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
fi
# Activate virtual environment and install dependencies
echo "Activating virtual environment..."
source venv/bin/activate
echo "Installing Python packages..."
python -m pip install --upgrade pip
pip install -r requirements.txt
# Install PyTorch with CUDA support for RTX 4090
echo
echo "Installing PyTorch with CUDA 12.1 support (for RTX 4090)..."
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
cd ..
echo
echo "========================================"
echo " Installation Complete!"
echo "========================================"
echo
echo "Next steps:"
echo " 1. Download AI models: ./setup-offline.sh"
echo " 2. Start the application: ./start-app.sh"
echo
chmod +x setup-offline.sh start-app.sh