From fbbcd48418664c7ff3491b98d03c993585c60fb3 Mon Sep 17 00:00:00 2001 From: xsl Date: Sat, 18 Jul 2026 19:18:52 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E9=80=82=E9=85=8D=20RTX=203090?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新系统服务配置文件: - hair-worker.service: 路径从 /home/xsl/ 改为 /home/ubuntu/,添加 comfyui/change_hair 依赖 - comfyui.service: 添加 --cache-classic --fast 标志优化性能 --- comfyui.service | 15 +++++++++++++++ hair-worker.service | 17 ++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) create mode 100644 comfyui.service diff --git a/comfyui.service b/comfyui.service new file mode 100644 index 0000000..0ce146e --- /dev/null +++ b/comfyui.service @@ -0,0 +1,15 @@ +[Unit] +Description=ComfyUI (127.0.0.1:8188) +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +User=ubuntu +WorkingDirectory=/home/ubuntu/ComfyUI +ExecStart=/home/ubuntu/ComfyUI/venv/bin/python main.py --listen 127.0.0.1 --port 8188 --cache-classic --fast +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target diff --git a/hair-worker.service b/hair-worker.service index 5f1de10..91f5acb 100644 --- a/hair-worker.service +++ b/hair-worker.service @@ -1,16 +1,15 @@ [Unit] -Description=Hair Worker (GPU) - 四庭七眼测量 接口1 -After=network.target +Description=hair GPU worker FastAPI (0.0.0.0:8187) +After=network-online.target comfyui.service change_hair-hair.service +Wants=comfyui.service change_hair-hair.service [Service] Type=simple -User=xsl -WorkingDirectory=/home/xsl/hair -# 鉴权密码:优先 worker_config.json;也可在此用环境变量覆盖 -# Environment=WORKER_ACCEPT_PASSWORDS=your-strong-secret -ExecStart=/home/xsl/hair/venv/bin/uvicorn app:app --host 0.0.0.0 --port 8187 -Restart=always -RestartSec=3 +User=ubuntu +WorkingDirectory=/home/ubuntu/hair +ExecStart=/home/ubuntu/hair/venv/bin/uvicorn app:app --host 0.0.0.0 --port 8187 +Restart=on-failure +RestartSec=5 [Install] WantedBy=multi-user.target