From c9876d70e4e6cbbc6719597030d6ba140da6f73f Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Sun, 20 Sep 2026 13:18:07 +0800 Subject: [PATCH] fix(1978): fix xiaoxia-gpu-worker.service bad unit file & log path permissions - User=%i -> User=ying (%%i is template-only specifier, not valid here) - After=musetalk.service -> After=musetalk-worker.service (match actual service name) - Log path from /tmp/ to $HOME/ to avoid permission issues for ying user --- deploy/gpu_worker/scripts/poll_and_update.sh | 2 +- deploy/gpu_worker/scripts/setup-gpu-node.sh | 3 ++- deploy/gpu_worker/scripts/update-gpu-worker.sh | 2 +- deploy/gpu_worker/xiaoxia-gpu-worker.service | 6 +++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/deploy/gpu_worker/scripts/poll_and_update.sh b/deploy/gpu_worker/scripts/poll_and_update.sh index fa7ecb55b..42d4ebbf6 100644 --- a/deploy/gpu_worker/scripts/poll_and_update.sh +++ b/deploy/gpu_worker/scripts/poll_and_update.sh @@ -3,7 +3,7 @@ REPO_API="https://git.xiaoxiajianji.com/api/v1/repos/xiaoxia/xiaoxia-saas/commits?sha=develop&path=deploy/gpu_worker&limit=1" STATE_FILE="/home/ying/projects/gpu-webhook/.last_commit" UPDATE_SCRIPT="/home/ying/projects/update-gpu-worker.sh" -LOG_FILE="/tmp/gpu-poll.log" +LOG_FILE="$HOME/gpu-poll.log" log() { echo "[$(date +"%Y-%m-%d %H:%M:%S")] $*" >> "$LOG_FILE" diff --git a/deploy/gpu_worker/scripts/setup-gpu-node.sh b/deploy/gpu_worker/scripts/setup-gpu-node.sh index 57a0085c5..e48a368d5 100644 --- a/deploy/gpu_worker/scripts/setup-gpu-node.sh +++ b/deploy/gpu_worker/scripts/setup-gpu-node.sh @@ -59,4 +59,5 @@ echo " sudo systemctl status musetalk-worker" echo " sudo systemctl status xiaoxia-gpu-worker" echo " sudo systemctl status gpu-poll.timer" echo "健康检查:curl http://127.0.0.1:7861/health" -echo "更新日志:tail -f /tmp/gpu-worker-update.log" +echo "更新日志:tail -f ~/gpu-worker-update.log" +echo "轮询日志:tail -f ~/gpu-poll.log" diff --git a/deploy/gpu_worker/scripts/update-gpu-worker.sh b/deploy/gpu_worker/scripts/update-gpu-worker.sh index 949e00778..28c374fbd 100644 --- a/deploy/gpu_worker/scripts/update-gpu-worker.sh +++ b/deploy/gpu_worker/scripts/update-gpu-worker.sh @@ -4,7 +4,7 @@ set -e REPO_URL="https://git.xiaoxiajianji.com/xiaoxia/xiaoxia-saas/raw/branch/develop/deploy/gpu_worker" MUSE_DIR="/home/ying/projects/MuseTalk" WORKER_DIR="/opt/xiaoxia-gpu-worker" -LOG_FILE="/tmp/gpu-worker-update.log" +LOG_FILE="$HOME/gpu-worker-update.log" log() { local NOW diff --git a/deploy/gpu_worker/xiaoxia-gpu-worker.service b/deploy/gpu_worker/xiaoxia-gpu-worker.service index 41cb5ac1f..a46a086b2 100644 --- a/deploy/gpu_worker/xiaoxia-gpu-worker.service +++ b/deploy/gpu_worker/xiaoxia-gpu-worker.service @@ -1,11 +1,11 @@ [Unit] Description=MuseTalk GPU Worker (xiaoxia-saas 反向轮询) -After=network.target musetalk.service -# 本地 MuseTalk 服务启动后再启动本 Worker;若 MuseTalk 没有 systemd 服务则删除 musetalk.service +After=network.target musetalk-worker.service +# 本地 MuseTalk 服务(musetalk-worker.service)启动后再启动本 Worker [Service] Type=simple -User=%i +User=ying WorkingDirectory=/opt/xiaoxia-gpu-worker # 读取环境变量(API 地址、Token、轮询间隔等) EnvironmentFile=/opt/xiaoxia-gpu-worker/.env