Commit 405222ce authored by Hongkuan Zhou's avatar Hongkuan Zhou Committed by GitHub
Browse files

fix: limit rust build parallel jobs (#366)

parent c396fa3e
...@@ -90,6 +90,10 @@ COPY Cargo.lock /workspace/ ...@@ -90,6 +90,10 @@ COPY Cargo.lock /workspace/
COPY rust-toolchain.toml /workspace/ COPY rust-toolchain.toml /workspace/
ARG CARGO_BUILD_JOBS ARG CARGO_BUILD_JOBS
# Set CARGO_BUILD_JOBS to 16 if not provided
# This is to prevent cargo from building $(nproc) jobs in parallel,
# which might exceed the number of opened files limit.
ENV CARGO_BUILD_JOBS=${CARGO_BUILD_JOBS:-16}
ENV CARGO_TARGET_DIR=/workspace/target ENV CARGO_TARGET_DIR=/workspace/target
......
...@@ -262,6 +262,10 @@ COPY components /workspace/components ...@@ -262,6 +262,10 @@ COPY components /workspace/components
COPY launch /workspace/launch COPY launch /workspace/launch
ARG CARGO_BUILD_JOBS ARG CARGO_BUILD_JOBS
# Set CARGO_BUILD_JOBS to 16 if not provided
# This is to prevent cargo from building $(nproc) jobs in parallel,
# which might exceed the number of opened files limit.
ENV CARGO_BUILD_JOBS=${CARGO_BUILD_JOBS:-16}
ENV CARGO_TARGET_DIR=/workspace/target ENV CARGO_TARGET_DIR=/workspace/target
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment