bugfix
This commit is contained in:
parent
497064c492
commit
ba51003c00
29
deploy.sh
29
deploy.sh
@ -1,13 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 变量
|
|
||||||
#
|
|
||||||
# home
|
|
||||||
# user
|
|
||||||
# passwd
|
|
||||||
# modelpath
|
|
||||||
# modelname
|
|
||||||
# gpucnt
|
|
||||||
# port
|
|
||||||
#
|
#
|
||||||
# 开始要检查安装nvidia驱动
|
# 开始要检查安装nvidia驱动
|
||||||
|
|
||||||
@ -20,12 +11,16 @@ pkgname=$(basename $git_url)
|
|||||||
port=$2
|
port=$2
|
||||||
usrname=$(id -un)
|
usrname=$(id -un)
|
||||||
grpname=$(id -gn)
|
grpname=$(id -gn)
|
||||||
pkg_home=$(pwd)/pkgname
|
pkg_home=$(pwd)/$pkgname
|
||||||
venvpath=$pkg_home/$pkgname.env
|
venvpath=$pkg_home/$pkgname.env
|
||||||
pip install git+$git_url
|
git clone $git_url
|
||||||
|
if [ ! -d "$pkg_home" ];then
|
||||||
|
echo git clone $git_url error
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
cd $pkg_home
|
cd $pkg_home
|
||||||
python3 -m venv $envpath
|
python3 -m venv $venvpath
|
||||||
source $envpath/bin/activate
|
source $venvpath/bin/activate
|
||||||
pip install setuptools wheel
|
pip install setuptools wheel
|
||||||
pip install git+https://git.kaiyuancloud.cn/yumoqing/apppublic
|
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/sqlor
|
||||||
@ -40,9 +35,15 @@ Wants=systemd-networkd.service
|
|||||||
User=$usrname
|
User=$usrname
|
||||||
Group=$grpname
|
Group=$grpname
|
||||||
WorkingDirectory=$pkg_home
|
WorkingDirectory=$pkg_home
|
||||||
ExecStart=$envpath/bin/python app/$3
|
ExecStart=killname app/$3
|
||||||
|
ExecStart=$venvpath/bin/python app/$3 -p $port
|
||||||
|
StandardOutput=append:/var/log/$pkgname/$pkgname.log
|
||||||
|
StandardError=append:/var/log/$pkgname/$pkgname.log
|
||||||
|
SyslogIdentifier=DeepSeek32B-kyyds671b.log
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
sudo ln -s $pkg_home/script/$pkgname.service /etc/systemd/system
|
sudo ln -s $pkg_home/script/$pkgname.service /etc/systemd/system
|
||||||
|
sudo mkdir /var/log/$pkgname
|
||||||
sudo systemctl start $pkgname.service
|
sudo systemctl start $pkgname.service
|
||||||
|
Loading…
Reference in New Issue
Block a user