Skip to content
This repository has been archived by the owner on Sep 25, 2022. It is now read-only.

Commit

Permalink
less para, more tests & logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jbigot committed Dec 6, 2021
1 parent 10038e9 commit c5cea1c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 30 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/docker_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ jobs:
run: |
set -ex
docker build \
--build-arg "PARALLELISM=3" \
--build-arg "GCC_VERSION=$([ latest = "${GCC_VERSION}" ] || echo "@${GCC_VERSION}")" \
--build-arg "BASE_IMAGE=pdidevel/bionic:${image_version}" \
-t pdidevel/bionic_gcc-${GCC_VERSION} \
Expand Down Expand Up @@ -83,7 +82,6 @@ jobs:
run: |
set -ex
docker build \
--build-arg "PARALLELISM=3" \
--build-arg "BASE_IMAGE=pdidevel/bionic_${COMPILER}:${image_version}" \
--build-arg "CMAKE_VERSION=$([ latest = "${CMAKE_VERSION}" ] || echo "@${CMAKE_VERSION}")" \
-t pdidevel/bionic_${COMPILER}_cmake-${CMAKE_VERSION} \
Expand Down Expand Up @@ -119,7 +117,6 @@ jobs:
run: |
set -ex
docker build \
--build-arg "PARALLELISM=3" \
--build-arg "BASE_IMAGE=pdidevel/bionic_${COMPILER}_${CMAKE}:${image_version}" \
--build-arg "MPI=openmpi$([ latest = "${OPENMPI_VERSION}" ] || echo "@${OPENMPI_VERSION}")" \
-t pdidevel/bionic_${COMPILER}_${CMAKE}_openmpi-${OPENMPI_VERSION} \
Expand Down Expand Up @@ -158,7 +155,6 @@ jobs:
run: |
set -ex
docker build \
--build-arg "PARALLELISM=3" \
--build-arg "BASE_IMAGE=bionic_${COMPILER}_${CMAKE}_${MPI}:${image_version}" \
--build-arg "LIBS_VERSION=${LIBS_VERSION}" \
-t pdidevel/bionic_${COMPILER}_${CMAKE}_${MPI}_libs-${LIBS_VERSION} \
Expand Down
11 changes: 8 additions & 3 deletions bionic/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
FROM ubuntu:18.04

ARG SPACK_INSTALL_ARGS

ENV SPACK_INSTALL_ARGS=${SPACK_INSTALL_ARGS:-"--verbose --fail-fast"}

ENV DOCKERFILE_BASE=ubuntu \
DOCKERFILE_DISTRO=ubuntu \
DOCKERFILE_DISTRO_VERSION=18.04 \
Expand Down Expand Up @@ -46,15 +50,16 @@ RUN set -ex \
&& ln -s ${SPACK_ROOT}/share/spack/docker/entrypoint.bash /usr/local/bin/docker-shell \
&& ln -s ${SPACK_ROOT}/share/spack/docker/entrypoint.bash /usr/local/bin/interactive-shell \
&& ln -s ${SPACK_ROOT}/share/spack/docker/entrypoint.bash /usr/local/bin/spack-env \
&& mkdir -p /root/.spack \
&& cp ${SPACK_ROOT}/share/spack/docker/modules.yaml /root/.spack/modules.yaml \
&& rm -rf /root/*.* /run/nologin ${SPACK_ROOT}/.git \
&& mkdir -p /root/.spack \
&& [ -f ~/.profile ] && ( sed -i 's/mesg n/( tty -s \&\& mesg n || true )/g' ~/.profile || true )

WORKDIR /root
SHELL ["docker-shell"]
ENTRYPOINT ["/bin/bash", "/opt/spack/share/spack/docker/entrypoint.bash"]
CMD ["interactive-shell"]

RUN spack spec hdf5+mpi \
RUN spack install ${SPACK_INSTALL_ARGS} --reuse patchelf target=x86_64 \
&& spack spec hdf5+mpi \
&& spack reindex \
&& sed 's/target:.*/target: x86_64/' -i /root/.spack/linux/compilers.yaml
6 changes: 1 addition & 5 deletions cmake/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ FROM ${BASE_IMAGE}

ARG CMAKE_VERSION
ARG SPACK_INSTALL_ARGS
ARG PARALLELISM=1

ENV SPACK_INSTALL_ARGS=${SPACK_INSTALL_ARGS:-"--show-log-on-error --fail-fast"}
ENV SPACK_INSTALL_ARGS=${SPACK_INSTALL_ARGS:-"--verbose --test=all --fail-fast"}
ENV CMAKE=cmake${CMAKE_VERSION}

SHELL ["/usr/local/bin/spack-env", "/bin/bash", "-c"]

RUN set -ex \
&& for N in {2..${PARALLELISM}} \
; do spack install ${SPACK_INSTALL_ARGS} --reuse "${CMAKE}%${COMPILER}" target=x86_64 \
& done \
&& spack install ${SPACK_INSTALL_ARGS} --reuse "${CMAKE}%${COMPILER}" target=x86_64
6 changes: 1 addition & 5 deletions gcc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,13 @@ FROM ${BASE_IMAGE}

ARG GCC_VERSION
ARG SPACK_INSTALL_ARGS
ARG PARALLELISM=1

ENV SPACK_INSTALL_ARGS=${SPACK_INSTALL_ARGS:-"--show-log-on-error --fail-fast"}
ENV SPACK_INSTALL_ARGS=${SPACK_INSTALL_ARGS:-"--verbose --test=all --fail-fast"}
ENV COMPILER=gcc${GCC_VERSION}

SHELL ["/usr/local/bin/spack-env", "/bin/bash", "-c"]

RUN set -ex \
&& for N in {2..${PARALLELISM}} \
; do spack install ${SPACK_INSTALL_ARGS} --reuse "${COMPILER}" target=x86_64 \
& done \
&& spack install ${SPACK_INSTALL_ARGS} --reuse "${COMPILER}" target=x86_64 \
&& spack load ${COMPILER} \
&& spack compiler find \
Expand Down
10 changes: 2 additions & 8 deletions libs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ FROM ${BASE_IMAGE}

ARG LIBS_VERSION
ARG SPACK_INSTALL_ARGS
ARG PARALLELISM=1

ENV SPACK_INSTALL_ARGS=${SPACK_INSTALL_ARGS:-"--show-log-on-error --fail-fast"}
ENV SPACK_INSTALL_ARGS=${SPACK_INSTALL_ARGS:-"--verbose --test=all --fail-fast"}
ENV MPI=${MPI}

SHELL ["/usr/local/bin/spack-env", "/bin/bash", "-c"]
Expand Down Expand Up @@ -39,9 +38,4 @@ RUN cd /opt/spack-environment \

RUN cd /opt/spack-environment \
&& spack env activate . \
&& ( for N in {2..${PARALLELISM}} \
; do spack install ${SPACK_INSTALL_ARGS} --reuse \
& done \
&& spack install ${SPACK_INSTALL_ARGS} --reuse \
) \
|| tail -n +1 -- /tmp/root/spack-stage/spack-stage-*/spack-*-out.txt
&& spack install ${SPACK_INSTALL_ARGS} --reuse
6 changes: 1 addition & 5 deletions mpi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@ FROM ${BASE_IMAGE}

ARG MPI
ARG SPACK_INSTALL_ARGS
ARG PARALLELISM=1

ENV SPACK_INSTALL_ARGS=${SPACK_INSTALL_ARGS:-"--show-log-on-error --fail-fast"}
ENV SPACK_INSTALL_ARGS=${SPACK_INSTALL_ARGS:-"--verbose --test=all --fail-fast"}
ENV MPI=${MPI}

SHELL ["/usr/local/bin/spack-env", "/bin/bash", "-c"]

RUN set -ex \
&& for N in {2..${PARALLELISM}} \
; do spack install ${SPACK_INSTALL_ARGS} --reuse "${MPI}%${COMPILER}" "^${CMAKE}" target=x86_64 \
& done \
&& spack install ${SPACK_INSTALL_ARGS} --reuse "${MPI}%${COMPILER}" "^${CMAKE}" target=x86_64

0 comments on commit c5cea1c

Please sign in to comment.