(fix):using virtual env and fix chromadb's version (#381)

This commit is contained in:
Scott
2023-11-14 17:51:47 +08:00
committed by GitHub
parent 438ee539d6
commit d4374f7074
2 changed files with 34 additions and 20 deletions

View File

@@ -83,6 +83,20 @@ function runJavaService {
function runPythonService {
pythonRunDir=${runtimeDir}/supersonic-${model_name}/llmparser
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 &
# add health check
for i in {1..10}

View File

@@ -1,7 +1,7 @@
langchain==0.0.207
openai==0.27.4
fastapi==0.95.1
chromadb==0.3.21
chromadb==0.3.26
tiktoken==0.3.3
uvicorn[standard]==0.21.1
pandas==1.5.3