mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 10:35:01 +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
1 changed files with 5 additions and 2 deletions
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:-}
|
API_KEY=${API_KEY:-}
|
||||||
CORE_IMAGES=${CORE_IMAGES:-false}
|
CORE_IMAGES=${CORE_IMAGES:-false}
|
||||||
# nprocs -1
|
# nprocs -1
|
||||||
procs=$(nproc)
|
if available nproc; then
|
||||||
procs=$((procs-1))
|
procs=$(nproc)
|
||||||
|
else
|
||||||
|
procs=1
|
||||||
|
fi
|
||||||
THREADS=${THREADS:-$procs}
|
THREADS=${THREADS:-$procs}
|
||||||
LATEST_VERSION=$(curl -s "https://api.github.com/repos/mudler/LocalAI/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
LATEST_VERSION=$(curl -s "https://api.github.com/repos/mudler/LocalAI/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||||
VERSION="${VERSION:-$LATEST_VERSION}"
|
VERSION="${VERSION:-$LATEST_VERSION}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue