-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeploy.sh
More file actions
executable file
·43 lines (33 loc) · 892 Bytes
/
deploy.sh
File metadata and controls
executable file
·43 lines (33 loc) · 892 Bytes
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
#!/bin/bash
# Trinity VPS Deployment Script
# Run on VPS after SCP transfer
set -e
DEPLOY_DIR="/opt/trinity"
echo "=== Trinity VPS Deployment ==="
# Create directory
mkdir -p $DEPLOY_DIR/bin
# Move binary
mv /root/vibee $DEPLOY_DIR/bin/
chmod +x $DEPLOY_DIR/bin/vibee
# Create systemd service if not exists
if [ ! -f /etc/systemd/system/trinity-api.service ]; then
cat > /etc/systemd/system/trinity-api.service << 'SVCEOF'
[Unit]
Description=Trinity GGUF Inference API
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/trinity
ExecStart=/opt/trinity/bin/vibee serve --model /opt/trinity/models/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf --port 8080
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
SVCEOF
fi
# Reload and restart
systemctl daemon-reload
systemctl restart trinity-api
systemctl status trinity-api
echo "=== Deployment Complete ==="