diff --git a/deploy/systemd/bge-embed.service b/deploy/systemd/bge-embed.service new file mode 100644 index 0000000..6890393 --- /dev/null +++ b/deploy/systemd/bge-embed.service @@ -0,0 +1,17 @@ +[Unit] +Description=MemoryWeave BGE-M3 ONNX Embed Server +After=network.target + +[Service] +Type=simple +Environment="BGE_MODEL_PATH=/home/muc/models/bge-m3/onnx" +Environment="BGE_PORT=8000" +ExecStartPre=/bin/bash -c 'if [ ! -f /home/muc/.hermes/scripts/bge_embed_server.py ]; then cp /tmp/memoryweave/deploy/bge_embed_server.py /home/muc/.hermes/scripts/ 2>/dev/null || true; fi' +ExecStart=/home/muc/.hermes/hermes-agent/.venv/bin/python3 /home/muc/.hermes/scripts/bge_embed_server.py +Restart=always +RestartSec=5 +StandardOutput=append:/tmp/bge_embed.log +StandardError=append:/tmp/bge_embed.log + +[Install] +WantedBy=default.target diff --git a/deploy/systemd/zhiyi-consolidate.service b/deploy/systemd/zhiyi-consolidate.service new file mode 100644 index 0000000..b01e273 --- /dev/null +++ b/deploy/systemd/zhiyi-consolidate.service @@ -0,0 +1,16 @@ +[Unit] +Description=MemoryWeave Rust IPC Sidecar (zhiyi-consolidate) +After=network.target + +[Service] +Type=simple +Environment="RUST_LOG=info" +ExecStartPre=/bin/bash -c 'if [ ! -f /home/muc/bin/zhiyi-consolidate ]; then cp /tmp/memoryweave/rust/target/release/zhiyi-consolidate /home/muc/bin/ 2>/dev/null || true; fi' +ExecStart=/home/muc/bin/zhiyi-consolidate --mode socket --socket /tmp/zhiyi-ipc.sock --data-dir /var/lib/memoryweave +Restart=always +RestartSec=5 +StandardOutput=append:/tmp/zhiyi-sidecar.log +StandardError=append:/tmp/zhiyi-sidecar.log + +[Install] +WantedBy=default.target diff --git a/deploy/systemd/zhiyid.service b/deploy/systemd/zhiyid.service new file mode 100644 index 0000000..a5989ac --- /dev/null +++ b/deploy/systemd/zhiyid.service @@ -0,0 +1,18 @@ +[Unit] +Description=ZhiYi MemoryWeave (织忆) — Go Daemon +Documentation=http://192.168.123.11:3000/xiaoxue_admin/memoryweave +After=network.target zhiyi-consolidate.service bge-embed.service +Wants=zhiyi-consolidate.service bge-embed.service + +[Service] +Type=simple +ExecStartPre=/bin/mkdir -p /var/lib/memoryweave /home/muc/.logs +ExecStart=/home/muc/bin/zhiyid-new +Restart=always +RestartSec=5 +MemoryMax=2G +CPUQuota=200% +Environment=STORAGE_BACKEND=lancedb + +[Install] +WantedBy=default.target