mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 20:25:12 +00:00
(fix):using virtual env and fix chromadb's version (#381)
This commit is contained in:
@@ -83,6 +83,20 @@ 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}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
langchain==0.0.207
|
langchain==0.0.207
|
||||||
openai==0.27.4
|
openai==0.27.4
|
||||||
fastapi==0.95.1
|
fastapi==0.95.1
|
||||||
chromadb==0.3.21
|
chromadb==0.3.26
|
||||||
tiktoken==0.3.3
|
tiktoken==0.3.3
|
||||||
uvicorn[standard]==0.21.1
|
uvicorn[standard]==0.21.1
|
||||||
pandas==1.5.3
|
pandas==1.5.3
|
||||||
|
|||||||
Reference in New Issue
Block a user