mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-12 12:37:55 +00:00
[improvement](python) remove virtualenv in python shell (#395)
This commit is contained in:
@@ -83,20 +83,6 @@ function runJavaService {
|
|||||||
function runPythonService {
|
function runPythonService {
|
||||||
pythonRunDir=${runtimeDir}/supersonic-${model_name}/llmparser
|
pythonRunDir=${runtimeDir}/supersonic-${model_name}/llmparser
|
||||||
cd $pythonRunDir
|
cd $pythonRunDir
|
||||||
# check if venv is available
|
|
||||||
if ! ${python_path} -c "import venv" &> /dev/null; then
|
|
||||||
echo "venv not found, installing virtualenv via pip..."
|
|
||||||
pip install virtualenv
|
|
||||||
# create a virtual environment using virtualenv
|
|
||||||
virtualenv venv
|
|
||||||
else
|
|
||||||
# create a virtual environment using venv
|
|
||||||
${python_path} -m venv venv
|
|
||||||
fi
|
|
||||||
# activate the virtual environment
|
|
||||||
source venv/bin/activate
|
|
||||||
# install dependencies
|
|
||||||
pip install --upgrade -r requirements.txt
|
|
||||||
nohup ${python_path} supersonic_llmparser.py > $pythonRunDir/llmparser.log 2>&1 &
|
nohup ${python_path} supersonic_llmparser.py > $pythonRunDir/llmparser.log 2>&1 &
|
||||||
# add health check
|
# add health check
|
||||||
for i in {1..10}
|
for i in {1..10}
|
||||||
|
|||||||
Reference in New Issue
Block a user