diff --git a/tools/gluten-te/centos/cbash-build.sh b/tools/gluten-te/centos/cbash-build.sh index ce45271c06e5..530f7edf2335 100755 --- a/tools/gluten-te/centos/cbash-build.sh +++ b/tools/gluten-te/centos/cbash-build.sh @@ -57,6 +57,7 @@ CBASH_DOCKER_RUN_ARGS="$CBASH_DOCKER_RUN_ARGS --privileged" CBASH_DOCKER_RUN_ARGS="$CBASH_DOCKER_RUN_ARGS --ulimit nofile=65536:65536" CBASH_DOCKER_RUN_ARGS="$CBASH_DOCKER_RUN_ARGS --ulimit core=-1" CBASH_DOCKER_RUN_ARGS="$CBASH_DOCKER_RUN_ARGS --security-opt seccomp=unconfined" +CBASH_DOCKER_RUN_ARGS="$CBASH_DOCKER_RUN_ARGS -e NUM_THREADS=$(nproc)" if [ "$MOUNT_MAVEN_CACHE" == "ON" ] then CBASH_DOCKER_RUN_ARGS="$CBASH_DOCKER_RUN_ARGS -v $HOME/.m2/repository:/root/.m2/repository" diff --git a/tools/gluten-te/ubuntu/cbash-build.sh b/tools/gluten-te/ubuntu/cbash-build.sh index dc8253b92b84..58d61295baf7 100755 --- a/tools/gluten-te/ubuntu/cbash-build.sh +++ b/tools/gluten-te/ubuntu/cbash-build.sh @@ -57,7 +57,7 @@ CBASH_DOCKER_RUN_ARGS="$CBASH_DOCKER_RUN_ARGS --privileged" CBASH_DOCKER_RUN_ARGS="$CBASH_DOCKER_RUN_ARGS --ulimit nofile=65536:65536" CBASH_DOCKER_RUN_ARGS="$CBASH_DOCKER_RUN_ARGS --ulimit core=-1" CBASH_DOCKER_RUN_ARGS="$CBASH_DOCKER_RUN_ARGS --security-opt seccomp=unconfined" -CBASH_DOCKER_RUN_ARGS="$CBASH_DOCKER_RUN_ARGS -e NUM_THREADS=30" +CBASH_DOCKER_RUN_ARGS="$CBASH_DOCKER_RUN_ARGS -e NUM_THREADS=$(nproc)" if [ "$MOUNT_MAVEN_CACHE" == "ON" ] then CBASH_DOCKER_RUN_ARGS="$CBASH_DOCKER_RUN_ARGS -v $HOME/.m2/repository:/root/.m2/repository"