Skip to content

Commit

Permalink
Limit the number of processes during build (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
alalazo authored Sep 20, 2023
1 parent b24956f commit c984ad2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ COPY Dockerfiles/linux-ubuntu22.04-x86_64_v2/compilers.yaml Dockerfiles/linux-ub
RUN --mount=type=cache,target=/root/.spack/cache \
spack -e . concretize -f && \
spack -e . env depfile -o Makefile && \
make -j && \
make -j $(nproc) && \
spack -e . gc --yes-to-all

# Remove Spack metadata, python cache and static libraries to save some bytes
Expand Down
6 changes: 3 additions & 3 deletions Dockerfiles/pcluster-amazonlinux-2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ RUN curl -sOL https://github.com/benmcollins/libjwt/archive/refs/tags/v${LIBJWT_
&& cd libjwt-${LIBJWT_VERSION}/ \
&& autoreconf --force --install \
&& ./configure --prefix=/opt/libjwt \
&& make -j \
&& make -j $(nproc) \
&& make install && make clean \
&& cd .. \
&& rm -rf v${LIBJWT_VERSION}.tar.gz libjwt-${LIBJWT_VERSION}
Expand All @@ -87,7 +87,7 @@ RUN curl -sOL https://github.com/openpmix/openpmix/releases/download/v${PMIX_VER
&& cd pmix-${PMIX_VERSION} \
&& ./autogen.pl \
&& ./configure --prefix=/opt/pmix \
&& make -j \
&& make -j $(nproc) \
&& make install && make clean \
&& cd .. \
&& rm -rf pmix-${PMIX_VERSION}.tar.gz pmix-${PMIX_VERSION}
Expand All @@ -97,7 +97,7 @@ RUN curl -sOL https://github.com/SchedMD/slurm/archive/slurm-${SLURM_VERSION}.ta
&& tar xf slurm-${SLURM_VERSION}.tar.gz \
&& cd slurm-slurm-${SLURM_VERSION}/ \
&& ./configure --prefix=/opt/slurm --with-pmix=/opt/pmix --with-jwt=/opt/libjwt \
&& make -j \
&& make -j $(nproc) \
&& make install && make install-contrib && make clean \
&& cd .. \
&& rm -rf slurm-${SLURM_VERSION}.tar.gz slurm-slurm-${SLURM_VERSION}
Expand Down
2 changes: 1 addition & 1 deletion Dockerfiles/tutorial-ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ COPY Dockerfiles/tutorial-ubuntu-22.04/compilers.yaml Dockerfiles/tutorial-ubunt
RUN --mount=type=cache,target=/root/.spack/cache \
spack -e . concretize -f && \
spack -e . env depfile -o Makefile && \
make -j && \
make -j $(nproc) && \
spack -e . gc --yes-to-all

# Remove Spack metadata, python cache and static libraries to save some bytes
Expand Down

0 comments on commit c984ad2

Please sign in to comment.