Skip to content

Commit d2de8cf

Browse files
committed
Set max thread count to 64 to prevent OOM in CI
1 parent 77f2a73 commit d2de8cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/gen_ort_dockerfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,8 @@ def dockerfile_for_linux(output_file):
353353
)
354354

355355
df += """
356-
RUN ./build.sh ${{COMMON_BUILD_ARGS}} --parallel $( nproc --all ) --update --build {}
356+
RUN N_PARALLEL_JOBS=$( [[ $(nproc --all) < 64 ]] && echo $(nproc --all) || echo 64 ) && \\
357+
./build.sh ${{COMMON_BUILD_ARGS}} --parallel ${N_PARALLEL_JOBS} --update --build {}
357358
""".format(
358359
ep_flags
359360
)

0 commit comments

Comments
 (0)