-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
51 lines (41 loc) · 1.17 KB
/
run.sh
File metadata and controls
51 lines (41 loc) · 1.17 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
#!/bin/bash
# Check if Python is installed
if ! command -v python3 &> /dev/null; then
echo "Python is not installed. Please install Python 3."
exit 1
fi
# Check if Git is installed
if ! command -v git &> /dev/null; then
echo "Git is not installed. Please install Git."
exit 1
fi
# Check for updates
echo "Checking for updates..."
git pull
# Check if virtual environment exists
if [ ! -d ".venv" ]; then
echo "Creating virtual environment..."
python3 -m venv .venv
else
echo "Virtual environment already exists."
fi
# Activate virtual environment
source .venv/bin/activate
# Check if requirements.txt exists
if [ -f "requirements.txt" ]; then
echo "Installing dependencies..."
pip install -r requirements.txt
else
echo "requirements.txt does not exist. Skipping dependency installation."
fi
echo "Setup complete."
echo "Please make sure you have created OpenRouter API key and set it in the environment variables. (.env file)"
# Run src/ui.py
if [ -f "src/ui.py" ]; then
echo "Running src/ui.py..."
python src/ui.py
else
echo "src/ui.py does not exist. Please make sure the file exists."
fi
# Deactivate virtual environment
deactivate