File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,6 +90,10 @@ COPY Cargo.lock /workspace/
9090COPY rust-toolchain.toml /workspace/
9191
9292ARG CARGO_BUILD_JOBS
93+ # Set CARGO_BUILD_JOBS to 16 if not provided
94+ # This is to prevent cargo from building $(nproc) jobs in parallel,
95+ # which might exceed the number of opened files limit.
96+ ENV CARGO_BUILD_JOBS=${CARGO_BUILD_JOBS:-16}
9397
9498ENV CARGO_TARGET_DIR=/workspace/target
9599
Original file line number Diff line number Diff line change @@ -262,6 +262,10 @@ COPY components /workspace/components
262262COPY launch /workspace/launch
263263
264264ARG CARGO_BUILD_JOBS
265+ # Set CARGO_BUILD_JOBS to 16 if not provided
266+ # This is to prevent cargo from building $(nproc) jobs in parallel,
267+ # which might exceed the number of opened files limit.
268+ ENV CARGO_BUILD_JOBS=${CARGO_BUILD_JOBS:-16}
265269
266270ENV CARGO_TARGET_DIR=/workspace/target
267271
You can’t perform that action at this time.
0 commit comments