FIX:docker continer can't find bc command

jira: nojira
Change-Id: Icce22284a0d1a69387418a7c9e0c8b695c4cdac0
This commit is contained in:
Mack 2024-09-23 09:55:22 +08:00 committed by Lane.Wei
parent bf19ea188e
commit 0c8a165a6e
1 changed files with 1 additions and 1 deletions

View File

@ -119,7 +119,7 @@ fi
if ! [[ -n "${DISABLE_PARALLEL_LIMIT}" ]]
then
FREE_MEM_GB=$(free -g -t | grep 'Mem' | rev | cut -d" " -f1 | rev)
MAX_THREADS=$(echo "scale=0; $FREE_MEM_GB / 2.5" | bc)
MAX_THREADS=$((FREE_MEM_GB * 10 / 25))
if [ "$MAX_THREADS" -lt 1 ]; then
export CMAKE_BUILD_PARALLEL_LEVEL=1
else