forked from shubha07m/Nemo-Multimodal-Edge-AI-Orchestrator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_service.sh
More file actions
executable file
·51 lines (41 loc) · 1.32 KB
/
Copy pathsetup_service.sh
File metadata and controls
executable file
·51 lines (41 loc) · 1.32 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
#!/bin/bash
# Configuration
SERVICE_NAME="nemo-reflex"
USER="nemo"
WORKING_DIR="/home/nemo/Desktop/my_projects/explorer/nemo_reflex/agents"
PYTHON_EXEC="/home/nemo/miniforge3/envs/robot/bin/python"
MAIN_SCRIPT="main.py"
echo "--- Installing Nemo Reflex Service ---"
# 1. Install System Dependencies (Just in case)
echo "[INFO] Checking dependencies..."
sudo apt update
sudo apt install -y v4l-utils libcamera-apps
# 2. Create Systemd Unit File
echo "[INFO] Creating service file..."
sudo bash -c "cat > /etc/systemd/system/${SERVICE_NAME}.service" <<EOL
[Unit]
Description=Nemo Reflex - Dual Vision Agent
After=network.target sound.target ollama.service
Wants=ollama.service
[Service]
Type=simple
User=${USER}
WorkingDirectory=${WORKING_DIR}
ExecStart=${PYTHON_EXEC} ${MAIN_SCRIPT}
Restart=always
RestartSec=5
Environment="PYTHONUNBUFFERED=1"
Environment="PATH=/usr/bin:/bin:${WORKING_DIR}"
[Install]
WantedBy=multi-user.target
EOL
# 3. Reload and Enable
echo "[INFO] Reloading systemd daemon..."
sudo systemctl daemon-reload
echo "[INFO] Enabling service on boot..."
sudo systemctl enable ${SERVICE_NAME}
echo "[INFO] Starting service now..."
sudo systemctl start ${SERVICE_NAME}
echo "--- INSTALLATION COMPLETE ---"
echo "Check status with: sudo systemctl status ${SERVICE_NAME}"
echo "View logs with: journalctl -u ${SERVICE_NAME} -f"