(improvement) Support PIP_PATH and PYTHON_PATH env var for building and starting services (#146)

This commit is contained in:
Bowen Liang
2023-09-26 11:42:55 +08:00
committed by GitHub
parent fbb67f54ab
commit f5b8690ce0
2 changed files with 4 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# pip path
pip_path="/usr/local/bin/pip3"
pip_path=${PIP_PATH:-"/usr/local/bin/pip3"}
sbinDir=$(cd "$(dirname "$0")"; pwd)
baseDir=$(cd "$sbinDir/.." && pwd -P)
@@ -36,8 +36,9 @@ cp -fr webapp ../../launchers/chat/target/classes
cp -fr webapp ../../launchers/standalone/target/classes
#5. build backend python modules
echo "start installing python modules with pip: ${pip_path}"
requirementPath=$baseDir/../chat/core/src/main/python/requirements.txt
${pip_path} install -r ${requirementPath}
${pip_path} install -r ${requirementPath}
echo "install python modules success"
#6. reset runtime

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
python_path="/usr/local/bin/python3"
python_path=${PYTHON_PATH:-"/usr/local/bin/python3"}
readonly CHAT_APP_NAME="supersonic_chat"
readonly SEMANTIC_APP_NAME="supersonic_semantic"
readonly LLMPARSER_APP_NAME="supersonic_llmparser"