mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 10:35:01 +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
1 changed files with 5 additions and 5 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue