Skip to content

Commit

Permalink
quote what needs quoting
Browse files Browse the repository at this point in the history
  • Loading branch information
jbigot committed Jul 5, 2024
1 parent 67f4001 commit 38cba85
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 24 deletions.
14 changes: 7 additions & 7 deletions spack/2a-precomp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ ARG COMPILER
ARG SPACK_INSTALL_ARGS="--show-log-on-error --fail-fast"

COPY ${COMPILER}.lst compilerpkg.lst
RUN spack solve -I --reuse $(cat compilerpkg.lst) target=x86_64 \
&& ( if ! spack fetch -Dm $(cat compilerpkg.lst) ; then spack clean -a; false; fi \
|| if ! spack fetch -Dm $(cat compilerpkg.lst) ; then spack clean -a; false; fi \
|| if ! spack fetch -Dm $(cat compilerpkg.lst) ; then spack clean -a; false; fi \
|| if ! spack fetch -Dm $(cat compilerpkg.lst) ; then spack clean -a; false; fi \
|| if ! spack fetch -Dm $(cat compilerpkg.lst) ; then spack clean -a; false; fi ) \
&& spack install -j 1 ${SPACK_INSTALL_ARGS} --reuse --only dependencies $(cat compilerpkg.lst) target=x86_64 \
RUN spack solve -I --reuse "$(cat compilerpkg.lst)" target=x86_64 \
&& ( if ! spack fetch -Dm "$(cat compilerpkg.lst)" ; then spack clean -a; false; fi \
|| if ! spack fetch -Dm "$(cat compilerpkg.lst)" ; then spack clean -a; false; fi \
|| if ! spack fetch -Dm "$(cat compilerpkg.lst)" ; then spack clean -a; false; fi \
|| if ! spack fetch -Dm "$(cat compilerpkg.lst)" ; then spack clean -a; false; fi \
|| if ! spack fetch -Dm "$(cat compilerpkg.lst)" ; then spack clean -a; false; fi ) \
&& spack install ${SPACK_INSTALL_ARGS} --reuse --only dependencies "$(cat compilerpkg.lst)" target=x86_64 \
&& spack clean -a
20 changes: 10 additions & 10 deletions spack/2b-compiler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ LABEL "org.opencontainers.image.source"="https://github.com/pdidev/test_env"

ARG SPACK_INSTALL_ARGS="--show-log-on-error --fail-fast"

RUN spack solve -I --reuse $(cat compilerpkg.lst) target=x86_64 \
&& ( if ! spack fetch -m $(cat compilerpkg.lst) ; then spack clean -a; false; fi \
|| if ! spack fetch -m $(cat compilerpkg.lst) ; then spack clean -a; false; fi \
|| if ! spack fetch -m $(cat compilerpkg.lst) ; then spack clean -a; false; fi \
|| if ! spack fetch -m $(cat compilerpkg.lst) ; then spack clean -a; false; fi \
|| if ! spack fetch -m $(cat compilerpkg.lst) ; then spack clean -a; false; fi ) \
&& spack install -j 2 ${SPACK_INSTALL_ARGS} --reuse $(cat compilerpkg.lst) target=x86_64 \
RUN spack solve -I --reuse "$(cat compilerpkg.lst)" target=x86_64 \
&& ( if ! spack fetch -m "$(cat compilerpkg.lst)" ; then spack clean -a; false; fi \
|| if ! spack fetch -m "$(cat compilerpkg.lst)" ; then spack clean -a; false; fi \
|| if ! spack fetch -m "$(cat compilerpkg.lst)" ; then spack clean -a; false; fi \
|| if ! spack fetch -m "$(cat compilerpkg.lst)" ; then spack clean -a; false; fi \
|| if ! spack fetch -m "$(cat compilerpkg.lst)" ; then spack clean -a; false; fi ) \
&& spack install ${SPACK_INSTALL_ARGS} --reuse "$(cat compilerpkg.lst)" target=x86_64 \
&& spack clean -a


# Workaround clang 14.0.2 that reports version as 14.0.1
RUN spack find -v --no-groups "$(cat compilerpkg.lst)" > compilerpkg.lst \
&& spack find --no-groups "$(cat compilerpkg.lst)" > compiler.lst \
RUN spack find -v --no-groups ""$(cat compilerpkg.lst)"" > compilerpkg.lst \
&& spack find --no-groups ""$(cat compilerpkg.lst)"" > compiler.lst \
&& sed 's/llvm/clang/' -i compiler.lst \
&& sed 's/[email protected]/[email protected]/' -i compiler.lst \
&& spack clean -a
Expand All @@ -33,7 +33,7 @@ RUN spack compiler remove --scope site -a gcc || true \
&& spack compiler remove -a clang || true \
&& spack compiler remove -a gcc || true \
&& spack compiler find --scope site \
"$(spack find --format '{name}' --paths "$(cat compilerpkg.lst)" | awk '{print $2}')" \
"$(spack find --format '{name}' --paths ""$(cat compilerpkg.lst)"" | awk '{print $2}')" \
&& spack compiler remove --scope defaults -a gcc || true \
&& spack compiler remove --scope defaults -a clang || true \
&& spack compiler remove --scope system -a gcc || true \
Expand Down
6 changes: 3 additions & 3 deletions spack/3a-precomp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ LABEL "org.opencontainers.image.source"="https://github.com/pdidev/test_env"

COPY spack.yaml spack.yaml
RUN spack env create pdienv spack.yaml \
&& spack -e pdienv add -l compilerpkg $(cat compilerpkg.lst) \
&& spack -e pdienv add -l compiler $(cat compiler.lst) \
&& spack -e pdienv add -l compilerpkg ""$(cat compilerpkg.lst)"" \
&& spack -e pdienv add -l compiler "$(cat compiler.lst)" \
&& spack clean -a


Expand All @@ -33,5 +33,5 @@ RUN ( if ! spack -e pdienv fetch -m; then spack clean -a; false; fi \
|| if ! spack -e pdienv fetch -m; then spack clean -a; false; fi \
|| if ! spack -e pdienv fetch -m; then spack clean -a; false; fi \
|| if ! spack -e pdienv fetch -m; then spack clean -a; false; fi ) \
&& spack -e pdienv install ${SPACK_INSTALL_ARGS} --only dependencies $(cat compilerpkg.lst) \
&& spack -e pdienv install ${SPACK_INSTALL_ARGS} --only dependencies "$(cat compilerpkg.lst)" \
&& spack clean -a
4 changes: 2 additions & 2 deletions spack/3b-compiler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ RUN ( if ! spack -e pdienv fetch -m; then spack clean -a; false; fi \
|| if ! spack -e pdienv fetch -m; then spack clean -a; false; fi \
|| if ! spack -e pdienv fetch -m; then spack clean -a; false; fi \
|| if ! spack -e pdienv fetch -m; then spack clean -a; false; fi ) \
&& spack -e pdienv install ${SPACK_INSTALL_ARGS} $(cat compilerpkg.lst) \
&& spack -e pdienv install ${SPACK_INSTALL_ARGS} "$(cat compilerpkg.lst)" \
&& spack mark -ia \
&& spack mark -e "/$(spack -e pdienv find --format '{name}' --no-groups -L $(cat compilerpkg.lst) | awk '{print $1}')" \
&& spack mark -e "/$(spack -e pdienv find --format '{name}' --no-groups -L "$(cat compilerpkg.lst)" | awk '{print $1}')" \
&& spack gc -y \
&& spack clean -a

Expand Down
4 changes: 2 additions & 2 deletions spack/5a-mpi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ RUN spack -e pdienv concretize -fU \
# workaround clang issue with mixed compilers where Fortran CHARACTER detection script requires CFLAGS=-fPIE
# Still present with spack 0.18
# && if ( spack --version | grep -qs '^0\.18' && grep -qs clang compiler.lst ) \
# ; then spack -e pdienv install --only dependencies ${SPACK_INSTALL_ARGS} $(cat mpi.lst|head -n 1) \
# && ( export CFLAGS=-fPIE; spack -e pdienv install ${SPACK_INSTALL_ARGS} --dirty $(cat mpi.lst|head -n 1) ) \
# ; then spack -e pdienv install --only dependencies ${SPACK_INSTALL_ARGS} "$(cat mpi.lst|head -n 1)" \
# && ( export CFLAGS=-fPIE; spack -e pdienv install ${SPACK_INSTALL_ARGS} --dirty "$(cat mpi.lst|head -n 1)" ) \
# ; fi
RUN ( if ! spack -e pdienv fetch -m; then spack clean -a; false; fi \
|| if ! spack -e pdienv fetch -m; then spack clean -a; false; fi \
Expand Down

0 comments on commit 38cba85

Please sign in to comment.