bugfix
This commit is contained in:
parent
b95c6f458f
commit
1604885268
10
f5tts/f5tts.json
Normal file
10
f5tts/f5tts.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"home":"/data/f5tts",
|
||||
"user":"f5tts",
|
||||
"passwd":"Ymq@651018",
|
||||
"modelpath":"/share/models/QwQ-32B",
|
||||
"modelname":"qwq:32b",
|
||||
"port":8101,
|
||||
"ws_port":8102
|
||||
"gpucnt":8
|
||||
}
|
64
f5tts/f5tts.sh
Normal file
64
f5tts/f5tts.sh
Normal file
@ -0,0 +1,64 @@
|
||||
#!/bin/bash
|
||||
# 变量
|
||||
#
|
||||
# home
|
||||
# user
|
||||
# passwd
|
||||
# modelpath
|
||||
# modelname
|
||||
# gpucnt
|
||||
# port
|
||||
#
|
||||
# 开始要检查安装nvidia驱动
|
||||
|
||||
sudo apt install git-lfs
|
||||
sudo rm -rf {{home}}
|
||||
sudo mkdir {{home}}
|
||||
sudo chown -R $(id -un):$(id -gn) {{home}}
|
||||
sudo apt -y install python3-venv
|
||||
mkdir {{home}}/.pip
|
||||
cat <<EOF> {{home}}/.pip/pip.conf
|
||||
[global]
|
||||
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
[install]
|
||||
trusted-host = https://pypi.tuna.tsinghua.edu.cn
|
||||
EOF
|
||||
cat <<EOF>{{home}}/run.sh
|
||||
#!/bin/bash
|
||||
|
||||
{{home}}/py3/bin/python {{home}}/py/f5tts/app/f5tts.py -w {{home}}/py/f5tts -p {{port}} 2>>{{home}}/py/f5tts/logs/f5tts.log &
|
||||
{{home}}/py3/bin/python {{home}}/py/f5tts/app/f5tts.py -w {{home}}/py/f5tts -p {{ws_port}} 2>>{{home}}/py/f5tts/logs/f5tts.log &
|
||||
|
||||
EOF
|
||||
chmod +x {{home}}/run.sh
|
||||
cat <<EOF>{{home}}/{{user}}.service
|
||||
[Unit]
|
||||
Wants=systemd-networkd.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=su - {{user}} -c "{{home}}/run.sh"
|
||||
ExecStop=su - {{user}} "killname {{home}}/py/f5tts/app/f5tts.py"
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
sudo mv {{home}}/{{user}}.service /etc/systemd/system
|
||||
python3 -m venv {{home}}/py3
|
||||
{{home}}/py3/bin/pip install torch==2.4.0+cu124 torchaudio==2.4.0+cu124 --extra-index-url https://download.pytorch.org/whl/cu124
|
||||
mkdir {{home}}/py
|
||||
pip install git+https://git.kaiyuancloud.cn/yumoqing/apppublic
|
||||
pip install git+https://git.kaiyuancloud.cn/yumoqing/sqlor
|
||||
pip install git+https://git.kaiyuancloud.cn/yumoqing/ahserver
|
||||
pip install f5-tts
|
||||
cd {{home}}/py
|
||||
git clone https://git.kaiyuancloud.cn/yumoqing/f5tts
|
||||
sudo deluser {{user}}
|
||||
sudo delgroup {{user}}
|
||||
sudo groupadd {{user}}
|
||||
sudo useradd -m -g {{user}} -s /usr/bin/bash -d {{home}} {{user}}
|
||||
echo "{{user}}:{{passwd}}" | sudo chpasswd
|
||||
sudo chown -R {{user}}:{{user}} {{home}}
|
||||
sudo systemctl enable {{user}}.service
|
||||
sudo systemctl start {{user}}.service
|
||||
|
||||
exit 0
|
3
f5tts/f5tts.ui
Normal file
3
f5tts/f5tts.ui
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user