-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·64 lines (52 loc) · 1.58 KB
/
install.sh
File metadata and controls
executable file
·64 lines (52 loc) · 1.58 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
#!/bin/bash
# GemmaSOS Installation Script
# Installs dependencies and sets up the crisis intervention system
set -e
echo "🔒 GemmaSOS - Crisis Intervention System Installation"
echo "=================================================="
# Check Python version
echo "Checking Python version..."
python_version=$(python3 --version 2>&1 | awk '{print $2}' | cut -d. -f1,2)
required_version="3.8"
if [ "$(printf '%s\n' "$required_version" "$python_version" | sort -V | head -n1)" = "$required_version" ]; then
echo "✅ Python $python_version detected (requires 3.8+)"
else
echo "❌ Python 3.8+ required. Found: $python_version"
exit 1
fi
# Check if virtual environment exists
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
fi
# Activate virtual environment
echo "Activating virtual environment..."
source venv/bin/activate
# Upgrade pip
echo "Upgrading pip..."
pip install --upgrade pip
# Install requirements
echo "Installing dependencies..."
pip install -r requirements.txt
# Create necessary directories
echo "Creating directories..."
mkdir -p logs
mkdir -p temp
# Set permissions
echo "Setting permissions..."
chmod +x run.py
chmod +x test_system.py
echo ""
echo "✅ Installation completed successfully!"
echo ""
echo "To run the system:"
echo " python run.py"
echo ""
echo "To test the system:"
echo " python test_system.py"
echo ""
echo "To activate the virtual environment manually:"
echo " source venv/bin/activate"
echo ""
echo "🔒 Privacy Notice: All processing happens on your device."
echo " No data is sent to external servers."