mirror of
https://github.com/mudler/LocalAI.git
synced 2024-12-19 20:57:54 +00:00
fix(install.sh): not all systems have nproc
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
04b01cd62c
commit
9e6dec0bc4
7
docs/static/install.sh
vendored
7
docs/static/install.sh
vendored
@ -77,8 +77,11 @@ USE_AIO=${USE_AIO:-false}
|
||||
API_KEY=${API_KEY:-}
|
||||
CORE_IMAGES=${CORE_IMAGES:-false}
|
||||
# nprocs -1
|
||||
procs=$(nproc)
|
||||
procs=$((procs-1))
|
||||
if available nproc; then
|
||||
procs=$(nproc)
|
||||
else
|
||||
procs=1
|
||||
fi
|
||||
THREADS=${THREADS:-$procs}
|
||||
LATEST_VERSION=$(curl -s "https://api.github.com/repos/mudler/LocalAI/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||
VERSION="${VERSION:-$LATEST_VERSION}"
|
||||
|
Loading…
Reference in New Issue
Block a user