From a6b0b4cabd518dbb8929ec00cf2eff912f035dfd Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 15 Mar 2025 19:40:45 +0800 Subject: [PATCH] bugfix --- qwq32b/qwq32b.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/qwq32b/qwq32b.sh b/qwq32b/qwq32b.sh index c1cc461..26887cc 100644 --- a/qwq32b/qwq32b.sh +++ b/qwq32b/qwq32b.sh @@ -9,17 +9,11 @@ create_user() { - sudo deluser {{user}} - sudo delgroup {{user}} - sudo useradd -m -g {{user}} -s bash -d {{home}} {{user}} - echo "{{user}}:{{passwd}}" | sudo chpasswd {{user}} } -curusr=$(id -un) -curgrp=$(id -gn) sudo apt install git-lfs sudo rm -rf {{home}} sudo mkdir {{home}} -sudo chown -R $(curusr):$(curgrp) $(home) +sudo chown -R $(id -un):$(id -gn) {{home}} sudo apt -y install python3-venv mkdir {{home}}/.pip cat < {{home}}/.pip/pip.conf @@ -35,7 +29,7 @@ cat <{{home}}/run.sh 32b --gpu-memory-utilization 0.9 --max_model_len 40960 --tensor-parallel-size 4 EOF chmod +x {{home}}/run.sh -sudo cat </etc/systemd/system/{{user}}.service +cat <{{user}}.service [Unit] Wants=systemd-networkd.service Requires=nginx.service @@ -47,9 +41,13 @@ ExecStop=su - {{user}} "killname vllm" [Install] WantedBy=multi-user.target EOF +sudo cp {{user}}.service /etc/systemd/system python3 -m venv {{home}}/py3 {{home}}/py3/bin/pip install vllm -create_user +sudo deluser {{user}} +sudo delgroup {{user}} +sudo useradd -m -g {{user}} -s bash -d {{home}} {{user}} +echo "{{user}}:{{passwd}}" | sudo chpasswd sudo chown -R {{user}}:{{user}} {{home}} systemctl enable {{user}}.service systemctl start {{user}}.service