File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -284,7 +284,8 @@ function run_bazel_build() {
284284 jobs_args=" --jobs=${CUSTOM_JOBS} "
285285 fi
286286 # default set cpus number according to the total cpu cores
287- local cpu_count=$(( $(nproc) / 2 ))
287+ local nproc_cnt=$( nproc)
288+ local cpu_count=$(( nproc_cnt > 8 ? 8 : nproc_cnt ))
288289 local cpus_args=" --local_resources=cpu=${cpu_count} "
289290 if [[ -n " ${CUSTOM_CPUS} " ]]; then
290291 cpus_args=" --local_resources=cpu=${CUSTOM_CPUS} "
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ common --enable_bzlmod
1717# Prefer https://bcr.bazel.build/
1818build --registry=https://bcr.bazel.build/
1919build --registry=https://raw.githubusercontent.com/wheelos/bazel-central-registry/main
20+ build --registry=file:///apollo/data/bazel-central-registry
2021
2122# Set up a shared cache to avoid repeated pulls from remote libraries
2223build --repository_cache=/var/cache/bazel/repo_cache
You can’t perform that action at this time.
0 commit comments