-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·51 lines (41 loc) · 1.47 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·51 lines (41 loc) · 1.47 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
#!/bin/bash
# Get the absolute path of the project directory
PROJECT_DIR="$(cd "$(dirname "$0")" && pwd)"
BACKEND_DIR="$PROJECT_DIR/backend"
FRONTEND_DIR="$PROJECT_DIR/frontend"
echo "SmartProBono Installation"
echo "========================="
echo "Project directory: $PROJECT_DIR"
# Install backend dependencies
echo "
Setting up backend..."
cd "$BACKEND_DIR"
# Create Python virtual environment
echo "Creating Python virtual environment..."
python3 -m venv venv
source venv/bin/activate
python3 -m pip install --upgrade pip
# Install core dependencies first (required)
echo "Installing core backend dependencies..."
python3 -m pip install -r requirements.txt
# Install optional dependencies (AI, documents, PDF)
echo "Installing optional backend dependencies..."
# AI module requirements
python3 -m pip install openai==1.0.0 numpy==1.26.4 || true
# Document processing
python3 -m pip install docxtpl==0.16.7 phonenumbers==8.13.28 || true
# Try installing OpenCV (might fail on some systems)
python3 -m pip install opencv-python-headless==4.8.0.74 || true
# PDF processing
python3 -m pip install WeasyPrint==60.1 reportlab==4.1.0 pdfkit==1.0.0 PyPDF2==3.0.1 || true
echo "Backend setup complete!"
# Install frontend dependencies
echo "
Setting up frontend..."
cd "$FRONTEND_DIR"
# Use --legacy-peer-deps to avoid npm dependency conflicts
echo "Installing frontend dependencies..."
npm install --legacy-peer-deps
echo "
Installation complete!"
echo "To run the application, use: ./start.sh"