-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·70 lines (60 loc) · 2.1 KB
/
setup.sh
File metadata and controls
executable file
·70 lines (60 loc) · 2.1 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
#!/bin/bash
# OMBox Setup — installs dependencies, pulls the model, and starts the bridge
# Usage: curl -fsSL https://raw.githubusercontent.com/.../setup.sh | bash
set -e
echo "=== OMBox Setup ==="
echo ""
# Install Node.js if missing
if ! command -v node &> /dev/null; then
echo "Node.js not found. Installing..."
if command -v brew &> /dev/null; then
brew install node
elif command -v apt-get &> /dev/null; then
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
elif command -v dnf &> /dev/null; then
curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -
sudo dnf install -y nodejs
elif command -v pacman &> /dev/null; then
sudo pacman -S --noconfirm nodejs npm
else
echo "Could not auto-install Node.js. Trying nvm..."
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
nvm install --lts
fi
fi
# Verify node is available
if ! command -v node &> /dev/null; then
echo "ERROR: Node.js installation failed. Please install manually from https://nodejs.org"
exit 1
fi
echo "Node.js: $(node --version)"
# Install Ollama if missing
if ! command -v ollama &> /dev/null; then
echo "Ollama not found. Installing..."
curl -fsSL https://ollama.com/install.sh | sh
fi
echo "Ollama: $(ollama --version)"
# Start Ollama in the background if not already running
if ! curl -s http://localhost:11434/api/tags &> /dev/null; then
echo "Starting Ollama server..."
ollama serve &> /dev/null &
sleep 3
fi
# Pull the model
echo ""
echo "Pulling gemma4 (~9GB). If that's too big, ctrl-c and run:"
echo " ollama pull qwen3.5:0.8b"
echo " (then update MODEL in your Python code to match)"
echo ""
ollama pull gemma4
echo ""
echo "=== Setup complete! ==="
echo ""
echo "Starting WhatsApp bridge... scan the QR code with your phone."
echo "(WhatsApp > Settings > Linked Devices > Link a Device)"
echo ""
# Start the WhatsApp bridge
npx @iamtrask/om-bridge