-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
79 lines (69 loc) · 2.54 KB
/
install.sh
File metadata and controls
79 lines (69 loc) · 2.54 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
75
76
77
78
79
#!/bin/bash
set -e
echo "=== 🚀 Starting installation and deployment ==="
# Detect OS type
OS=$(uname -s)
echo "Detected OS: $OS"
if [[ "$OS" == "Linux" ]]; then
AUDIO_MATCH="recording_(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d+\+\d{2}:\d{2})"
# AUDIO_MATCH="recording_(\d{4}-\d{2}-\d{2}T\d{2}_\d{2}_\d{2}\.\d+\+\d{2}_\d{2})"
else
AUDIO_MATCH="recording_(\d{4}-\d{2}-\d{2}T\d{2}_\d{2}_\d{2}\.\d+\+\d{2}_\d{2})"
fi
# Check if docker is installed
if ! command -v docker &> /dev/null; then
echo "❌ Docker not found"
if [[ "$OS" == "Linux" ]]; then
echo "Installing Docker..."
curl -fsSL https://get.docker.com | sh
sudo systemctl enable docker
sudo systemctl start docker
else
echo "Please install Docker Desktop first:"
echo "macOS download: https://www.docker.com/products/docker-desktop/"
echo "After installation, please run this script again."
exit 1
fi
else
echo "✅ Docker is installed"
fi
# Check docker-compose
if ! docker compose version &> /dev/null; then
echo "❌ Docker Compose not found"
if [[ "$OS" == "Linux" ]]; then
echo "Installing docker-compose..."
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
else
echo "Please ensure Docker Desktop has the compose feature enabled."
exit 1
fi
else
echo "✅ Docker Compose is installed"
fi
# Create .env file
echo "=== ⚙️ Configuring environment variables ==="
read -p "Please enter the monitor directory (e.g. /home/user/record): " MONITOR_ROOT
read -p "Please enter OpenRouter ApiKey (if none, generate at https://openrouter.ai/settings/keys): " OPENROUTER_API_KEY
read -p "Please enter OpenRouter Model Name (default google/gemini-2.5-flash works better): " OPENROUTER_API_MODEL
cat > .env <<EOF
AUDIO_DIR=./record
MONITOR_ROOT=${MONITOR_ROOT}
CONFIG_FILE=./workflows_config.json
AUDIO_MATCH=${AUDIO_MATCH}
MONITOR_POLL_INTERVAL=5
MONITOR_IDLE_SECONDS=300
MONITOR_MAX_SECONDS=600
OPENROUTER_API_MODEL=${OPENROUTER_API_MODEL:-google/gemini-2.5-flash}
OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
EOF
echo "✅ .env file generated:"
cat .env
# Start docker compose
echo "=== 🐳 Starting services ==="
docker compose up -d
echo "✅ Startup complete! View logs with:"
echo " docker compose logs -f"
echo "Or stop services with:"
echo " docker compose down"
echo "meetProcesser successfully deployed at http://127.0.0.1:8000! 🎉"