-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·40 lines (33 loc) · 1.11 KB
/
run.sh
File metadata and controls
executable file
·40 lines (33 loc) · 1.11 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
#!/bin/bash
# Check if Python is installed
if ! command -v python3 &> /dev/null; then
echo "Python 3 is not installed. Please install Python 3 to run this application."
exit 1
fi
# Check if uv is installed
if ! command -v uv &> /dev/null; then
echo "UV is not installed. Please install UV package manager:"
echo " curl -sSf https://astral.sh/uv/install.sh | sh"
echo "Or visit https://github.com/astral-sh/uv for installation instructions."
exit 1
fi
# Check if virtual environment exists, create if not
if [ ! -d ".venv" ]; then
echo "Creating virtual environment using UV..."
uv venv .venv
fi
# Activate virtual environment
echo "Activating virtual environment..."
source .venv/bin/activate
# Install dependencies
echo "Installing dependencies using UV..."
uv pip install -r requirements.txt
# Environment variable information
echo ""
echo "Environment Variables:"
echo " APTREPO - Set a default repository URL (optional)"
echo " Example: APTREPO=https://apt.armbian.com python app.py"
echo ""
# Run the application
echo "Starting Flask application on http://localhost:5000"
python app.py