feat: set WEB_CONCURRENCY to number of CPU cores

add-more-languages
Meng Zhang 2023-04-04 11:54:57 +08:00
parent 7c5d1d26bd
commit 962f4b53b5
1 changed files with 4 additions and 0 deletions

View File

@ -9,6 +9,10 @@ export CONFIG_FILE=${CONFIG_FILE:-/data/config/tabby.toml}
# server
export MODEL_NAME="${MODEL_NAME:-TabbyML/J-350M}"
export MODEL_BACKEND="${MODEL_BACKEND:-python}"
if [ ! -n "$WEB_CONCURRENCY" ]; then
# Set WEB_CONCURRENCY for uvicorn workers.
export WEB_CONCURRENCY=$(nproc --all)
fi
# projects
export GIT_REPOSITORIES_DIR="${REPOSITORIES_DIR:-/data/repositories}"