mirror of
https://github.com/mudler/LocalAI.git
synced 2024-12-20 05:07:54 +00:00
Using exec when starting a backend instead of spawning a new process (#2720)
Co-authored-by: Simon Siebert <ansiebert@deloitte.de>
This commit is contained in:
parent
9280060e05
commit
17608ea6aa
@ -148,13 +148,13 @@ function startBackend() {
|
|||||||
ensureVenv
|
ensureVenv
|
||||||
|
|
||||||
if [ ! -z ${BACKEND_FILE} ]; then
|
if [ ! -z ${BACKEND_FILE} ]; then
|
||||||
python ${BACKEND_FILE} $@
|
exec python ${BACKEND_FILE} $@
|
||||||
elif [ -e "${MY_DIR}/server.py" ]; then
|
elif [ -e "${MY_DIR}/server.py" ]; then
|
||||||
python ${MY_DIR}/server.py $@
|
exec python ${MY_DIR}/server.py $@
|
||||||
elif [ -e "${MY_DIR}/backend.py" ]; then
|
elif [ -e "${MY_DIR}/backend.py" ]; then
|
||||||
python ${MY_DIR}/backend.py $@
|
exec python ${MY_DIR}/backend.py $@
|
||||||
elif [ -e "${MY_DIR}/${BACKEND_NAME}.py" ]; then
|
elif [ -e "${MY_DIR}/${BACKEND_NAME}.py" ]; then
|
||||||
python ${MY_DIR}/${BACKEND_NAME}.py $@
|
exec python ${MY_DIR}/${BACKEND_NAME}.py $@
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,4 +210,4 @@ function checkTargets() {
|
|||||||
echo false
|
echo false
|
||||||
}
|
}
|
||||||
|
|
||||||
init
|
init
|
||||||
|
Loading…
Reference in New Issue
Block a user