forked from sagnik/Project_Velocity
33 lines
1.3 KiB
Bash
33 lines
1.3 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
sudo systemctl stop nemoclaw-velocity.service || true
|
|
sudo pkill -f '/usr/bin/nemoclaw my-assistant connect --detach' || true
|
|
cat > /tmp/nemoclaw-velocity.service <<'EOF'
|
|
[Unit]
|
|
Description=NemoClaw Velocity Sentinel Gateway Bootstrap
|
|
After=network.target docker.service ollama.service
|
|
Wants=docker.service ollama.service
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
User=ubuntu
|
|
Group=ubuntu
|
|
WorkingDirectory=/opt/dlami/nvme/nemoclaw
|
|
Environment=HOME=/home/ubuntu
|
|
Environment=NEMOCLAW_HOME=/opt/dlami/nvme/nemoclaw
|
|
Environment=OPENSHELL_HOME=/opt/dlami/nvme/openshell
|
|
ExecStart=/bin/bash -lc 'openshell gateway start --name nemoclaw --port 8080 --gpu >/dev/null && openshell gateway select nemoclaw >/dev/null && nemoclaw my-assistant status >/dev/null'
|
|
ExecStop=/bin/bash -lc 'openshell gateway select nemoclaw >/dev/null && openshell gateway stop >/dev/null || true'
|
|
StandardOutput=append:/opt/dlami/nvme/logs/nemoclaw.log
|
|
StandardError=append:/opt/dlami/nvme/logs/nemoclaw.log
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
sudo mv /tmp/nemoclaw-velocity.service /etc/systemd/system/nemoclaw-velocity.service
|
|
sudo systemctl daemon-reload
|
|
sudo systemctl restart nemoclaw-velocity.service
|
|
sleep 5
|
|
sudo systemctl is-active nemoclaw-velocity.service
|
|
sudo systemctl status nemoclaw-velocity.service --no-pager -n 40 |