diff --git a/.github/workflows/debuntu_docker_images.yml b/.github/workflows/debuntu_docker_images.yml new file mode 100644 index 0000000..ec7482a --- /dev/null +++ b/.github/workflows/debuntu_docker_images.yml @@ -0,0 +1,58 @@ +name: Debuntu images +on: + schedule: [ { cron: "50 23 * * 0" } ] # run every Sunday 23h50 + push: { branches: [ main, 'v*' ] } + pull_request: +defaults: + run: + shell: bash +jobs: + debuntu: + strategy: + fail-fast: false + matrix: + base: ['ubuntu/jammy', 'ubuntu/rolling', 'debian/oldstable', 'debian/unstable'] + mpi: ['openmpi', 'mpich'] + variant: ['mini', 'all', 'pdi'] + runs-on: ubuntu-latest + steps: + - name: Free space + uses: jlumbroso/free-disk-space@main + with: { tool-cache: true } + - name: Login on GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Setup BuildX + uses: docker/setup-buildx-action@v3 + - name: Compute tag, distro & version + id: info + run: | + echo "tags<> "${GITHUB_OUTPUT}" + echo "ghcr.io/pdidev/${{ matrix.base }}/${{ matrix.mpi }}/${{ matrix.variant }}" >> "${GITHUB_OUTPUT}" + echo "ghcr.io/pdidev/${{ matrix.base }}/${{ matrix.mpi }}/${{ matrix.variant }}:${GITHUB_SHA:0:7}" >> "${GITHUB_OUTPUT}" + if [ 'true' = "${{ github.event_name == 'push' || github.event_name == 'schedule' }}" ] + then + echo "ghcr.io/pdidev/${{ matrix.base }}/${{ matrix.mpi }}/${{ matrix.variant }}:${{ github.ref_name }}" >> "${GITHUB_OUTPUT}" + fi + echo "TAGS_LIST_EOF" >> "${GITHUB_OUTPUT}" + BASE="${{ matrix.base }}" + echo "distro=${BASE%/*}" + echo "distro=${BASE%/*}" >> "${GITHUB_OUTPUT}" + echo "distro_version=${BASE##*/}" + echo "distro_version=${BASE##*/}" >> "${GITHUB_OUTPUT}" + - name: Build and push + uses: docker/build-push-action@v5 + with: + cache-from: "ghcr.io/pdidev/test_env/cache/${{ matrix.base }}/${{ matrix.mpi }}/${{ matrix.variant }}" + cache-to: "ghcr.io/pdidev/test_env/cache/${{ matrix.base }}/${{ matrix.mpi }}/${{ matrix.variant }}" + build-args: | + MPI=${{ matrix.mpi }} + DISTRO=${{ steps.info.outputs.distro }} + DISTRO_VERSION=${{ steps.info.outputs.distro_version }} + tags: | + ${{ steps.info.outputs.tags }} + context: "{{defaultContext}}:debuntu/${{ matrix.variant }}" + push: true diff --git a/.github/workflows/docker_images.yml b/.github/workflows/spack_docker_images.yml similarity index 78% rename from .github/workflows/docker_images.yml rename to .github/workflows/spack_docker_images.yml index 2b125f4..7354575 100644 --- a/.github/workflows/docker_images.yml +++ b/.github/workflows/spack_docker_images.yml @@ -1,4 +1,4 @@ -name: Docker Image CI +name: Spack images on: schedule: [ { cron: "50 23 * * 0" } ] # run every Sunday 23h50 push: { branches: [ main, 'v*' ] } @@ -10,7 +10,7 @@ jobs: step1a_base: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: get cache if: ${{ github.event_name != 'schedule' }} run: | @@ -22,8 +22,9 @@ jobs: CACHE_INFO="$(cat CACHE_INFO)" echo "Cache: ${CACHE_INFO}" echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin - docker build \ + DOCKER_BUILDKIT=1 docker build \ ${CACHE_INFO} \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ -t ghcr.io/pdidev/test_env/base \ -t ghcr.io/pdidev/test_env/base:${GITHUB_SHA:0:7} \ spack/1a-base @@ -35,15 +36,16 @@ jobs: needs: step1a_base runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: get cache run: | echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin docker pull ghcr.io/pdidev/test_env/spackbase || true - name: build run: | - docker build \ + DOCKER_BUILDKIT=1 docker build \ --cache-from ghcr.io/pdidev/test_env/spackbase \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg IMAGE_TAG=${GITHUB_SHA:0:7} \ -t ghcr.io/pdidev/test_env/spackbase \ -t ghcr.io/pdidev/test_env/spackbase:${GITHUB_SHA:0:7} \ @@ -61,7 +63,7 @@ jobs: needs: step1b_spackbase runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: get cache run: | sudo rm -rf /opt/az /opt/hostedtoolcache /usr/local/graalvm \ @@ -71,8 +73,9 @@ jobs: docker pull ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-2a || true - name: build run: | - docker build \ + DOCKER_BUILDKIT=1 docker build \ --cache-from ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-2a \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg VERSION=${{ matrix.version }} \ --build-arg COMPILER=${{ matrix.compiler }} \ --build-arg IMAGE_TAG=${GITHUB_SHA:0:7} \ @@ -92,7 +95,7 @@ jobs: needs: step2a_precomp runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: get cache run: | sudo rm -rf /opt/az /opt/hostedtoolcache /usr/local/graalvm \ @@ -102,8 +105,9 @@ jobs: docker pull ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-2b || true - name: build run: | - docker build \ + DOCKER_BUILDKIT=1 docker build \ --cache-from ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-2b \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg VERSION=${{ matrix.version }} \ --build-arg COMPILER=${{ matrix.compiler }} \ --build-arg IMAGE_TAG=${GITHUB_SHA:0:7} \ @@ -123,7 +127,7 @@ jobs: needs: step2b_compiler runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: get cache run: | sudo rm -rf /opt/az /opt/hostedtoolcache /usr/local/graalvm \ @@ -133,8 +137,9 @@ jobs: docker pull ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-2c || true - name: build run: | - docker build \ + DOCKER_BUILDKIT=1 docker build \ --cache-from ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-2c \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg VERSION=${{ matrix.version }} \ --build-arg COMPILER=${{ matrix.compiler }} \ --build-arg IMAGE_TAG=${GITHUB_SHA:0:7} \ @@ -154,7 +159,7 @@ jobs: needs: step2c_squash runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: get cache run: | sudo rm -rf /opt/az /opt/hostedtoolcache /usr/local/graalvm \ @@ -164,8 +169,9 @@ jobs: docker pull ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-3a || true - name: build run: | - docker build \ + DOCKER_BUILDKIT=1 docker build \ --cache-from ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-3a \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg VERSION=${{ matrix.version }} \ --build-arg COMPILER=${{ matrix.compiler }} \ --build-arg IMAGE_TAG=${GITHUB_SHA:0:7} \ @@ -185,7 +191,7 @@ jobs: needs: step3a_precomp runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: get cache run: | sudo rm -rf /opt/az /opt/hostedtoolcache /usr/local/graalvm \ @@ -195,8 +201,9 @@ jobs: docker pull ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-3b || true - name: build run: | - docker build \ + DOCKER_BUILDKIT=1 docker build \ --cache-from ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-3b \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg VERSION=${{ matrix.version }} \ --build-arg COMPILER=${{ matrix.compiler }} \ --build-arg IMAGE_TAG=${GITHUB_SHA:0:7} \ @@ -216,7 +223,7 @@ jobs: needs: step3b_compiler runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: get cache run: | sudo rm -rf /opt/az /opt/hostedtoolcache /usr/local/graalvm \ @@ -226,8 +233,9 @@ jobs: docker pull ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-3c || true - name: build run: | - docker build \ + DOCKER_BUILDKIT=1 docker build \ --cache-from ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-3c \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg VERSION=${{ matrix.version }} \ --build-arg COMPILER=${{ matrix.compiler }} \ --build-arg IMAGE_TAG=${GITHUB_SHA:0:7} \ @@ -247,7 +255,7 @@ jobs: needs: step3c_squash runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: get cache run: | sudo rm -rf /opt/az /opt/hostedtoolcache /usr/local/graalvm \ @@ -257,8 +265,9 @@ jobs: docker pull ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-4a || true - name: build run: | - docker build \ + DOCKER_BUILDKIT=1 docker build \ --cache-from ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-4a \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg VERSION=${{ matrix.version }} \ --build-arg COMPILER=${{ matrix.compiler }} \ --build-arg IMAGE_TAG=${GITHUB_SHA:0:7} \ @@ -275,8 +284,9 @@ jobs: docker pull ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-4b || true - name: build run: | - docker build \ + DOCKER_BUILDKIT=1 docker build \ --cache-from ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-4b \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg VERSION=${{ matrix.version }} \ --build-arg COMPILER=${{ matrix.compiler }} \ --build-arg IMAGE_TAG=${GITHUB_SHA:0:7} \ @@ -297,7 +307,7 @@ jobs: needs: step4_baselibs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: get cache run: | sudo rm -rf /opt/az /opt/hostedtoolcache /usr/local/graalvm \ @@ -307,8 +317,9 @@ jobs: docker pull ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-${{ matrix.mpi }}-5a || true - name: build run: | - docker build \ + DOCKER_BUILDKIT=1 docker build \ --cache-from ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-${{ matrix.mpi }}-5a \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg VERSION=${{ matrix.version }} \ --build-arg COMPILER=${{ matrix.compiler }} \ --build-arg MPI=${{ matrix.mpi }} \ @@ -326,8 +337,9 @@ jobs: docker pull ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-${{ matrix.mpi }}-mini || true - name: build run: | - docker build \ + DOCKER_BUILDKIT=1 docker build \ --cache-from ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-${{ matrix.mpi }}-mini \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg VERSION=${{ matrix.version }} \ --build-arg COMPILER=${{ matrix.compiler }} \ --build-arg MPI=${{ matrix.mpi }} \ @@ -349,7 +361,7 @@ jobs: needs: step5_mpi runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: get cache run: | sudo rm -rf /opt/az /opt/hostedtoolcache /usr/local/graalvm \ @@ -359,8 +371,9 @@ jobs: docker pull ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-${{ matrix.mpi }}-all || true - name: build run: | - docker build \ + DOCKER_BUILDKIT=1 docker build \ --cache-from ghcr.io/pdidev/test_env/builder:${{ matrix.version }}-${{ matrix.compiler }}-${{ matrix.mpi }}-all \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg VERSION=${{ matrix.version }} \ --build-arg COMPILER=${{ matrix.compiler }} \ --build-arg MPI=${{ matrix.mpi }} \ @@ -383,7 +396,7 @@ jobs: needs: step6_optlibs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: get cache run: | sudo rm -rf /opt/az /opt/hostedtoolcache /usr/local/graalvm \ @@ -392,7 +405,9 @@ jobs: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin - name: build run: | - docker build \ + DOCKER_BUILDKIT=1 docker build \ + --cache-from ghcr.io/pdidev/spack/${{ matrix.version }}/${{ matrix.compiler }}/${{ matrix.mpi }}/${{ matrix.level }} \ + --build-arg BUILDKIT_INLINE_CACHE=1 \ --build-arg VERSION=${{ matrix.version }} \ --build-arg COMPILER=${{ matrix.compiler }} \ --build-arg MPI=${{ matrix.mpi }} \ @@ -411,102 +426,3 @@ jobs: DOCKER_TAG="${{github.ref_name}}" docker tag ghcr.io/pdidev/spack/${{ matrix.version }}/${{ matrix.compiler }}/${{ matrix.mpi }}/${{ matrix.level }} ghcr.io/pdidev/spack/${{ matrix.version }}/${{ matrix.compiler }}/${{ matrix.mpi }}/${{ matrix.level }}:${DOCKER_TAG} docker push ghcr.io/pdidev/spack/${{ matrix.version }}/${{ matrix.compiler }}/${{ matrix.mpi }}/${{ matrix.level }}:${DOCKER_TAG} - system_focal: - strategy: - fail-fast: false - matrix: - mpi: ['openmpi', 'mpich'] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: get cache - run: | - sudo rm -rf /opt/az /opt/hostedtoolcache /usr/local/graalvm \ - /usr/local/lib/android /usr/local/lib/node_modules \ - /usr/local/.ghcup /usr/share/dotnet /usr/share/swift - echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin - docker pull ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/mini || true - - name: build - run: | - docker build \ - --build-arg MPI=${{ matrix.mpi }} \ - --cache-from ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/mini \ - -t ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/mini \ - -t ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/mini:${GITHUB_SHA:0:7} \ - system/focal-mini - - name: publish - run: | - docker push ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/mini - docker push ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/mini:${GITHUB_SHA:0:7} - - name: Publish tagged - if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} - run: | - DOCKER_TAG="${{github.ref_name}}" - docker tag ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/mini ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/mini:${DOCKER_TAG} - docker push ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/mini:${DOCKER_TAG} - system_focal_libs: - strategy: - fail-fast: false - matrix: - mpi: ['openmpi', 'mpich'] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: get cache - run: | - sudo rm -rf /opt/az /opt/hostedtoolcache /usr/local/graalvm \ - /usr/local/lib/android /usr/local/lib/node_modules \ - /usr/local/.ghcup /usr/share/dotnet /usr/share/swift - echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin - docker pull ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/all || true - - name: build - run: | - docker build \ - --build-arg MPI=${{ matrix.mpi }} \ - --cache-from ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/all \ - -t ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/all \ - -t ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/all:${GITHUB_SHA:0:7} \ - system/focal-all - - name: publish - run: | - docker push ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/all - docker push ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/all:${GITHUB_SHA:0:7} - - name: Publish tagged - if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} - run: | - DOCKER_TAG="${{github.ref_name}}" - docker tag ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/all ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/all:${DOCKER_TAG} - docker push ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/all:${DOCKER_TAG} - system_focal_pdi: - strategy: - fail-fast: false - matrix: - mpi: ['openmpi', 'mpich'] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: get cache - run: | - sudo rm -rf /opt/az /opt/hostedtoolcache /usr/local/graalvm \ - /usr/local/lib/android /usr/local/lib/node_modules \ - /usr/local/.ghcup /usr/share/dotnet /usr/share/swift - echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin - docker pull ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/pdi || true - - name: build - run: | - docker build \ - --build-arg MPI=${{ matrix.mpi }} \ - --cache-from ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/pdi \ - -t ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/pdi \ - -t ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/pdi:${GITHUB_SHA:0:7} \ - system/focal-pdi - - name: publish - run: | - docker push ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/pdi - docker push ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/pdi:${GITHUB_SHA:0:7} - - name: Publish tagged - if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} - run: | - DOCKER_TAG="${{github.ref_name}}" - docker tag ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/pdi ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/pdi:${DOCKER_TAG} - docker push ghcr.io/pdidev/ubuntu/focal/${{ matrix.mpi }}/pdi:${DOCKER_TAG} diff --git a/system/focal-all/Dockerfile b/debuntu/all/Dockerfile similarity index 76% rename from system/focal-all/Dockerfile rename to debuntu/all/Dockerfile index b596b78..debc1db 100644 --- a/system/focal-all/Dockerfile +++ b/debuntu/all/Dockerfile @@ -1,14 +1,19 @@ -FROM ubuntu:20.04 AS main +ARG DISTRO +ARG DISTRO_VERSION + +FROM ${DISTRO}:${DISTRO_VERSION} AS main LABEL "org.opencontainers.image.source"="https://github.com/pdidev/test_env" +ARG DISTRO +ARG DISTRO_VERSION ARG MPI -ENV DOCKERFILE_BASE=ubuntu \ - DOCKERFILE_DISTRO=ubuntu \ - DOCKERFILE_DISTRO_VERSION=20.04 \ - HOME=/root \ - container=docker +ENV DOCKERFILE_BASE=${DISTRO} +ENV DOCKERFILE_DISTRO=${DISTRO} +ENV DOCKERFILE_DISTRO_VERSION=${DISTRO_VERSION} +ENV HOME=/root +ENV container=docker WORKDIR ${HOME} @@ -19,6 +24,7 @@ ENTRYPOINT ["/bin/bash_run"] CMD ["bash", "-i"] RUN set -ex \ + && if [ -f /etc/os-release ]; then . /etc/os-release; fi \ && chmod +x /bin/bash_run \ && export DEBIAN_FRONTEND=noninteractive \ && apt-get update -y \ @@ -27,10 +33,10 @@ RUN set -ex \ apt-transport-https \ ca-certificates \ curl \ - && echo "deb [ arch=amd64 ] https://raw.githubusercontent.com/pdidev/repo/pdi-master.ubuntu focal main" > /etc/apt/sources.list.d/pdi.list \ - && curl --output /etc/apt/trusted.gpg.d/pdidev-archive-keyring.gpg https://raw.githubusercontent.com/pdidev/repo/pdi-master.ubuntu/pdidev-archive-keyring.gpg \ + && echo "deb [ arch=amd64 ] https://raw.githubusercontent.com/pdidev/repo/pdi-master.${DISTRO} ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/pdi.list \ + && curl --output /etc/apt/trusted.gpg.d/pdidev-archive-keyring.gpg https://raw.githubusercontent.com/pdidev/repo/pdi-master.${DISTRO}/pdidev-archive-keyring.gpg \ && apt-get update -y \ - && if [[ "${MPI}" = openmpi ]]; then FLOWVR=flowvr; fi\ + && if [[ "${MPI}" = openmpi ]]; then FLOWVR=flowvr; MPI4PY=python3-mpi4py; fi\ && echo tzdata tzdata/Areas string Etc | debconf-set-selections \ && echo tzdata tzdata/Zones/Etc string UTC | debconf-set-selections \ && apt-get install -y --no-install-recommends \ @@ -43,6 +49,7 @@ RUN set -ex \ libfti-${MPI}-dev \ libhdf5-${MPI}-dev \ libnetcdf-dev \ + libnetcdf-mpi-dev \ libparaconf-dev \ libsion-${MPI}-dev \ libspdlog-dev \ @@ -52,6 +59,7 @@ RUN set -ex \ pkg-config \ pybind11-dev \ python3-dev \ + ${MPI4PY} \ python3-numpy \ python3-pip \ python3-setuptools \ @@ -65,10 +73,9 @@ RUN set -ex \ && rm -rf /run/nologin \ && rm -rf /root/* \ && [ -f ~/.profile ] && ( sed -i 's/mesg n/( tty -s \&\& mesg n || true )/g' ~/.profile || true ) \ - && pip3 install --no-cache-dir mpi4py \ && ldconfig -ENV PDI_SYSTEM=ubuntu-focal +ENV PDI_SYSTEM=${DISTRO}-${DISTRO_VERSION} ENV PDI_COMPILER=gcc ENV PDI_MPI=${MPI} ENV PDI_LIBS=provided diff --git a/system/focal-all/bash_run b/debuntu/all/bash_run similarity index 100% rename from system/focal-all/bash_run rename to debuntu/all/bash_run diff --git a/system/focal-mini/Dockerfile b/debuntu/mini/Dockerfile similarity index 84% rename from system/focal-mini/Dockerfile rename to debuntu/mini/Dockerfile index 4cdf363..74c97c8 100644 --- a/system/focal-mini/Dockerfile +++ b/debuntu/mini/Dockerfile @@ -1,14 +1,19 @@ -FROM ubuntu:20.04 AS main +ARG DISTRO +ARG DISTRO_VERSION + +FROM ${DISTRO}:${DISTRO_VERSION} AS main LABEL "org.opencontainers.image.source"="https://github.com/pdidev/test_env" +ARG DISTRO +ARG DISTRO_VERSION ARG MPI -ENV DOCKERFILE_BASE=ubuntu \ - DOCKERFILE_DISTRO=ubuntu \ - DOCKERFILE_DISTRO_VERSION=20.04 \ - HOME=/root \ - container=docker +ENV DOCKERFILE_BASE=${DISTRO} +ENV DOCKERFILE_DISTRO=${DISTRO} +ENV DOCKERFILE_DISTRO_VERSION=${DISTRO_VERSION} +ENV HOME=/root +ENV container=docker WORKDIR ${HOME} @@ -19,10 +24,12 @@ ENTRYPOINT ["/bin/bash_run"] CMD ["bash", "-i"] RUN set -ex \ + && if [ -f /etc/os-release ]; then . /etc/os-release; fi \ && chmod +x /bin/bash_run \ && export DEBIAN_FRONTEND=noninteractive \ && apt-get update -y \ && apt-get upgrade -y \ + && if [[ "${MPI}" = openmpi ]]; then MPI4PY=python3-mpi4py; fi \ && echo tzdata tzdata/Areas string Etc | debconf-set-selections \ && echo tzdata tzdata/Zones/Etc string UTC | debconf-set-selections \ && apt-get install -y --no-install-recommends \ @@ -49,6 +56,7 @@ RUN set -ex \ pkg-config \ python3-all \ python3-dev \ + ${MPI4PY} \ python3-numpy \ python3-pip \ python3-setuptools \ @@ -59,7 +67,6 @@ RUN set -ex \ && apt-get autoremove -y \ && apt-get clean -y \ && apt-get autoclean -y \ - && pip3 install --no-cache-dir mpi4py \ && ldconfig \ && useradd -d /home/ci -m -U ci \ && rm -rf /var/lib/apt/lists/* \ @@ -67,7 +74,7 @@ RUN set -ex \ && rm -rf /root/* \ && [ -f ~/.profile ] && ( sed -i 's/mesg n/( tty -s \&\& mesg n || true )/g' ~/.profile || true ) -ENV PDI_SYSTEM=ubuntu-focal +ENV PDI_SYSTEM=${DISTRO}-${DISTRO_VERSION} ENV PDI_COMPILER=gcc ENV PDI_MPI=${MPI} # only required for openmpi but... diff --git a/system/focal-mini/bash_run b/debuntu/mini/bash_run similarity index 100% rename from system/focal-mini/bash_run rename to debuntu/mini/bash_run diff --git a/system/focal-pdi/Dockerfile b/debuntu/pdi/Dockerfile similarity index 78% rename from system/focal-pdi/Dockerfile rename to debuntu/pdi/Dockerfile index dfef78a..4a7ce21 100644 --- a/system/focal-pdi/Dockerfile +++ b/debuntu/pdi/Dockerfile @@ -1,14 +1,19 @@ -FROM ubuntu:20.04 AS main +ARG DISTRO +ARG DISTRO_VERSION + +FROM ${DISTRO}:${DISTRO_VERSION} AS main LABEL "org.opencontainers.image.source"="https://github.com/pdidev/test_env" +ARG DISTRO +ARG DISTRO_VERSION ARG MPI -ENV DOCKERFILE_BASE=ubuntu \ - DOCKERFILE_DISTRO=ubuntu \ - DOCKERFILE_DISTRO_VERSION=20.04 \ - HOME=/root \ - container=docker +ENV DOCKERFILE_BASE=${DISTRO} +ENV DOCKERFILE_DISTRO=${DISTRO} +ENV DOCKERFILE_DISTRO_VERSION=${DISTRO_VERSION} +ENV HOME=/root +ENV container=docker WORKDIR ${HOME} @@ -19,6 +24,7 @@ ENTRYPOINT ["/bin/bash_run"] CMD ["bash", "-i"] RUN set -ex \ + && if [ -f /etc/os-release ]; then . /etc/os-release; fi \ && chmod +x /bin/bash_run \ && export DEBIAN_FRONTEND=noninteractive \ && apt-get update -y \ @@ -27,8 +33,8 @@ RUN set -ex \ apt-transport-https \ ca-certificates \ curl \ - && echo "deb [ arch=amd64 ] https://raw.githubusercontent.com/pdidev/repo/pdi-master.ubuntu focal main" > /etc/apt/sources.list.d/pdi.list \ - && curl --output /etc/apt/trusted.gpg.d/pdidev-archive-keyring.gpg https://raw.githubusercontent.com/pdidev/repo/pdi-master.ubuntu/pdidev-archive-keyring.gpg \ + && echo "deb [ arch=amd64 ] https://raw.githubusercontent.com/pdidev/repo/pdi-master.${DISTRO} ${VERSION_CODENAME} main" > /etc/apt/sources.list.d/pdi.list \ + && curl --output /etc/apt/trusted.gpg.d/pdidev-archive-keyring.gpg https://raw.githubusercontent.com/pdidev/repo/pdi-master.${DISTRO}/pdidev-archive-keyring.gpg \ && apt-get update -y \ && if [[ "${MPI}" = openmpi ]]; then PDIPLUGIN_FLOWVR=pdiplugin-flowvr; fi\ && echo tzdata tzdata/Areas string Etc | debconf-set-selections \ @@ -61,7 +67,7 @@ RUN set -ex \ && rm -rf /root/* \ && [ -f ~/.profile ] && ( sed -i 's/mesg n/( tty -s \&\& mesg n || true )/g' ~/.profile || true ) -ENV PDI_SYSTEM=ubuntu-focal +ENV PDI_SYSTEM=${DISTRO}-${DISTRO_VERSION} ENV PDI_COMPILER=gcc ENV PDI_MPI=${MPI} ENV PDI_LIBS=provided diff --git a/system/focal-pdi/bash_run b/debuntu/pdi/bash_run similarity index 100% rename from system/focal-pdi/bash_run rename to debuntu/pdi/bash_run diff --git a/spack/1a-base/Dockerfile b/spack/1a-base/Dockerfile index e1b5d21..4faff5c 100644 --- a/spack/1a-base/Dockerfile +++ b/spack/1a-base/Dockerfile @@ -1,11 +1,11 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 LABEL "org.opencontainers.image.source"="https://github.com/pdidev/test_env" ENV DOCKERFILE_BASE=ubuntu \ DOCKERFILE_DISTRO=ubuntu \ - DOCKERFILE_DISTRO_VERSION=20.04 \ + DOCKERFILE_DISTRO_VERSION=22.04 \ DEBIAN_FRONTEND=noninteractive \ HOME=/root \ LC_ALL=C \ diff --git a/spack/2a-precomp/Dockerfile b/spack/2a-precomp/Dockerfile index f6234c8..533bbfd 100644 --- a/spack/2a-precomp/Dockerfile +++ b/spack/2a-precomp/Dockerfile @@ -30,6 +30,7 @@ RUN spack config --scope site add "modules:default:roots:tcl:${SPACK_MODULES}" ARG COMPILER ARG SPACK_INSTALL_ARGS="--show-log-on-error --fail-fast" -COPY ${COMPILER}-${VERSION}.lst compilerpkg.lst +COPY ${COMPILER}.lst compilerpkg.lst RUN spack solve -I --reuse $(cat compilerpkg.lst) target=x86_64 \ - && spack install --deprecated ${SPACK_INSTALL_ARGS} --reuse --only dependencies $(cat compilerpkg.lst) target=x86_64 + && spack install ${SPACK_INSTALL_ARGS} --reuse --only dependencies $(cat compilerpkg.lst) target=x86_64 \ + && spack clean -a diff --git a/spack/2a-precomp/clang-latest.lst b/spack/2a-precomp/clang-latest.lst deleted file mode 100644 index bfc4813..0000000 --- a/spack/2a-precomp/clang-latest.lst +++ /dev/null @@ -1 +0,0 @@ -llvm@10.0.0:+llvm_dylib+link_llvm_dylib~lld~lldb diff --git a/spack/2a-precomp/clang-oldest.lst b/spack/2a-precomp/clang-oldest.lst deleted file mode 100644 index f6c20ed..0000000 --- a/spack/2a-precomp/clang-oldest.lst +++ /dev/null @@ -1 +0,0 @@ -llvm@10.0.0+llvm_dylib+link_llvm_dylib~lld~lldb diff --git a/spack/2a-precomp/clang.lst b/spack/2a-precomp/clang.lst new file mode 100644 index 0000000..39f235a --- /dev/null +++ b/spack/2a-precomp/clang.lst @@ -0,0 +1 @@ +llvm+llvm_dylib+link_llvm_dylib~lldb diff --git a/spack/2a-precomp/gcc-latest.lst b/spack/2a-precomp/gcc-latest.lst deleted file mode 100644 index 27b0be5..0000000 --- a/spack/2a-precomp/gcc-latest.lst +++ /dev/null @@ -1 +0,0 @@ -gcc@9.3.0: diff --git a/spack/2a-precomp/gcc-oldest.lst b/spack/2a-precomp/gcc-oldest.lst deleted file mode 100644 index 5cc4f49..0000000 --- a/spack/2a-precomp/gcc-oldest.lst +++ /dev/null @@ -1 +0,0 @@ -gcc@9.3.0 diff --git a/spack/2a-precomp/gcc.lst b/spack/2a-precomp/gcc.lst new file mode 100644 index 0000000..90584dd --- /dev/null +++ b/spack/2a-precomp/gcc.lst @@ -0,0 +1 @@ +gcc diff --git a/spack/2b-compiler/Dockerfile b/spack/2b-compiler/Dockerfile index 1ae0c95..951fbc0 100644 --- a/spack/2b-compiler/Dockerfile +++ b/spack/2b-compiler/Dockerfile @@ -10,32 +10,42 @@ 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 \ - && spack install ${SPACK_INSTALL_ARGS} --reuse $(cat compilerpkg.lst) target=x86_64 + && spack install ${SPACK_INSTALL_ARGS} --reuse $(cat compilerpkg.lst) target=x86_64 \ + && spack clean -a RUN spack find --no-groups "$(cat compilerpkg.lst)" > compilerpkg.lst \ && cp compilerpkg.lst compiler.lst \ - && sed 's/llvm/clang/' -i compiler.lst + && sed 's/llvm/clang/' -i compiler.lst \ + && spack clean -a # switch to our new, just built, compiler -RUN spack compiler remove --scope site -a gcc || true -RUN spack compiler remove --scope site -a clang || true -RUN spack compiler remove -a clang || true -RUN spack compiler remove -a gcc || true +RUN spack compiler remove --scope site -a gcc || true \ + && spack clean -a +RUN spack compiler remove --scope site -a clang || true \ + && spack clean -a +RUN spack compiler remove -a clang || true \ + && spack clean -a +RUN spack compiler remove -a gcc || true \ + && spack clean -a RUN spack compiler find --scope site \ - "$(spack find --format '{name}' --paths "$(cat compilerpkg.lst)" | awk '{print $2}')" -RUN spack compiler remove --scope defaults -a gcc || true -RUN spack compiler remove --scope defaults -a clang || true -RUN spack compiler remove --scope system -a gcc || true -RUN spack compiler remove --scope system -a clang || true -RUN spack compiler remove --scope user -a gcc || true -RUN spack compiler remove --scope user -a clang || true + "$(spack find --format '{name}' --paths "$(cat compilerpkg.lst)" | awk '{print $2}')" \ + && spack clean -a +RUN spack compiler remove --scope defaults -a gcc || true \ + && spack clean -a +RUN spack compiler remove --scope defaults -a clang || true \ + && spack clean -a +RUN spack compiler remove --scope system -a gcc || true \ + && spack clean -a +RUN spack compiler remove --scope system -a clang || true \ + && spack clean -a +RUN spack compiler remove --scope user -a gcc || true \ + && spack clean -a +RUN spack compiler remove --scope user -a clang || true \ + && spack clean -a # When the selected suite does not offer a Fortran compiler (clang), use gfortran RUN sed -i "s#f77\s*:\s*null#f77: /usr/bin/gfortran#I" ${SPACK_ROOT}/etc/spack/compilers.yaml RUN sed -i "s#fc\s*:\s*null#fc: /usr/bin/gfortran#I" ${SPACK_ROOT}/etc/spack/compilers.yaml - - -RUN spack clean -a diff --git a/spack/3a-precomp/Dockerfile b/spack/3a-precomp/Dockerfile index 1831634..c0dada7 100644 --- a/spack/3a-precomp/Dockerfile +++ b/spack/3a-precomp/Dockerfile @@ -13,9 +13,7 @@ RUN spack -e pdienv add -l compilerpkg $(cat compilerpkg.lst) RUN spack -e pdienv add -l compiler $(cat compiler.lst) -ARG VERSION - -COPY ${VERSION}.lst baselibs.lst +COPY baselibs.lst baselibs.lst RUN DEFAULT_IFS="${IFS}" \ ; IFS=$'\n' \ ; set -f \ @@ -26,10 +24,12 @@ RUN DEFAULT_IFS="${IFS}" \ ARG SPACK_INSTALL_ARGS="--show-log-on-error --fail-fast" -# --deprecated for some versions of our old env (python 3.6) -RUN spack -e pdienv concretize -fU -RUN spack -e pdienv fetch --deprecated $(cat compilerpkg.lst) \ - || spack -e pdienv fetch --deprecated $(cat compilerpkg.lst) \ - || spack -e pdienv fetch --deprecated $(cat compilerpkg.lst) \ - || spack -e pdienv fetch --deprecated $(cat compilerpkg.lst) -RUN spack -e pdienv install --deprecated ${SPACK_INSTALL_ARGS} --only dependencies $(cat compilerpkg.lst) +RUN spack -e pdienv concretize -fU \ + && spack clean -a +RUN spack -e pdienv fetch $(cat compilerpkg.lst) \ + || spack -e pdienv fetch $(cat compilerpkg.lst) \ + || spack -e pdienv fetch $(cat compilerpkg.lst) \ + || spack -e pdienv fetch $(cat compilerpkg.lst) \ + && spack clean -a +RUN spack -e pdienv install ${SPACK_INSTALL_ARGS} --only dependencies $(cat compilerpkg.lst) \ + && spack clean -a diff --git a/spack/3a-precomp/baselibs.lst b/spack/3a-precomp/baselibs.lst new file mode 100644 index 0000000..9e1e14a --- /dev/null +++ b/spack/3a-precomp/baselibs.lst @@ -0,0 +1,22 @@ +bison +cmake +file +flex +freeglut +glew +hwloc +libiconv +libxml2 +libxmu +libxslt +m4 +mesa ~llvm +mesa-glu +pkgconf +py-numpy +py-pyyaml ~libyaml +python +py-pip +swig +tar zip=gzip +zlib diff --git a/spack/3a-precomp/latest.lst b/spack/3a-precomp/latest.lst deleted file mode 100644 index 930b6f8..0000000 --- a/spack/3a-precomp/latest.lst +++ /dev/null @@ -1,22 +0,0 @@ -bison@3.5.1: -cmake@3.16.3: -file -flex@2.6.4: -freeglut -glew -hwloc@2.3.0: -libiconv -libxml2@2.9.10: -libxmu@1.1.2: -libxslt@1.1.33: -m4 -mesa ~llvm -mesa-glu -pkgconf -py-numpy@1.17.4: -py-pyyaml@5.3.1: ~libyaml -python@3.8.2: -py-pip@20.2: -swig@4.0.1: -tar zip=gzip -zlib@1.2.11: diff --git a/spack/3a-precomp/oldest.lst b/spack/3a-precomp/oldest.lst deleted file mode 100644 index ecc17f2..0000000 --- a/spack/3a-precomp/oldest.lst +++ /dev/null @@ -1,22 +0,0 @@ -bison@3.5.1 -cmake@3.16.3 -file -flex@2.6.4 -freeglut -glew -hwloc@2.3.0 -libiconv -libxml2@2.9.10 -libxmu@1.1.2 -libxslt@1.1.33 -m4 -mesa ~llvm -mesa-glu -pkgconf -py-numpy@1.17.4 -py-pyyaml@5.3.1 ~libyaml -python@3.8.2 -py-pip@20.2 -swig@4.0.1 -tar zip=gzip -zlib@1.2.11 diff --git a/spack/3b-compiler/Dockerfile b/spack/3b-compiler/Dockerfile index 8ddc3c6..64f4d32 100644 --- a/spack/3b-compiler/Dockerfile +++ b/spack/3b-compiler/Dockerfile @@ -9,34 +9,41 @@ LABEL "org.opencontainers.image.source"="https://github.com/pdidev/test_env" ARG SPACK_INSTALL_ARGS="--show-log-on-error --fail-fast" -# --deprecated for some versions of our old env (python 3.6) -RUN spack -e pdienv concretize -fU -RUN spack -e pdienv install --deprecated ${SPACK_INSTALL_ARGS} $(cat compilerpkg.lst) \ +RUN spack -e pdienv concretize -fU \ + && spack clean -a +RUN 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 gc -y + && spack gc -y \ + && spack clean -a # switch to our new, just built, compiler -RUN spack compiler remove --scope site -a gcc || true -RUN spack compiler remove --scope site -a clang || true -RUN spack -e pdienv compiler remove --scope env:pdienv -a gcc || true -RUN spack -e pdienv compiler remove --scope env:pdienv -a clang || true -RUN spack compiler remove -a clang || true -RUN spack compiler remove -a gcc || true +RUN spack compiler remove --scope site -a gcc || true \ + && spack clean -a +RUN spack compiler remove --scope site -a clang || true \ + && spack clean -a +RUN spack compiler remove -a clang || true \ + && spack clean -a +RUN spack compiler remove -a gcc || true \ + && spack clean -a RUN spack compiler find --scope site \ - "$(spack -e pdienv find --format '{name}' --paths "$(cat compilerpkg.lst)%$(cat compiler.lst)" | awk '{print $2}')" -RUN spack compiler remove --scope defaults -a gcc || true -RUN spack compiler remove --scope defaults -a clang || true -RUN spack compiler remove --scope system -a gcc || true -RUN spack compiler remove --scope system -a clang || true -RUN spack compiler remove --scope user -a gcc || true -RUN spack compiler remove --scope user -a clang || true + "$(spack find --format '{name}' --paths "$(cat compilerpkg.lst)" | awk '{print $2}')" \ + && spack clean -a +RUN spack compiler remove --scope defaults -a gcc || true \ + && spack clean -a +RUN spack compiler remove --scope defaults -a clang || true \ + && spack clean -a +RUN spack compiler remove --scope system -a gcc || true \ + && spack clean -a +RUN spack compiler remove --scope system -a clang || true \ + && spack clean -a +RUN spack compiler remove --scope user -a gcc || true \ + && spack clean -a +RUN spack compiler remove --scope user -a clang || true \ + && spack clean -a # When the selected suite does not offer a Fortran compiler (clang), use gfortran RUN sed -i "s#f77\s*:\s*null#f77: /usr/bin/gfortran#I" ${SPACK_ROOT}/etc/spack/compilers.yaml RUN sed -i "s#fc\s*:\s*null#fc: /usr/bin/gfortran#I" ${SPACK_ROOT}/etc/spack/compilers.yaml - - -RUN spack clean -a diff --git a/spack/4a-baselibs/Dockerfile b/spack/4a-baselibs/Dockerfile index a2b481b..0815352 100644 --- a/spack/4a-baselibs/Dockerfile +++ b/spack/4a-baselibs/Dockerfile @@ -9,11 +9,12 @@ LABEL "org.opencontainers.image.source"="https://github.com/pdidev/test_env" ARG SPACK_INSTALL_ARGS="--show-log-on-error --fail-fast" -# --deprecated for some versions of our old env (python 3.6) -RUN spack -e pdienv concretize -fU -RUN spack -e pdienv fetch --deprecated \ - || spack -e pdienv fetch --deprecated \ - || spack -e pdienv fetch --deprecated \ - || spack -e pdienv fetch --deprecated -RUN spack -e pdienv install --deprecated ${SPACK_INSTALL_ARGS} -RUN spack clean -a +RUN spack -e pdienv concretize -fU \ + && spack clean -a +RUN spack -e pdienv fetch \ + || spack -e pdienv fetch \ + || spack -e pdienv fetch \ + || spack -e pdienv fetch \ + && spack clean -a +RUN spack -e pdienv install ${SPACK_INSTALL_ARGS} \ + && spack clean -a diff --git a/spack/5a-mpi/Dockerfile b/spack/5a-mpi/Dockerfile index ce7ac39..fa12204 100644 --- a/spack/5a-mpi/Dockerfile +++ b/spack/5a-mpi/Dockerfile @@ -7,28 +7,33 @@ FROM ghcr.io/pdidev/test_env/builder:${VERSION}-${COMPILER}-4b-${IMAGE_TAG} LABEL "org.opencontainers.image.source"="https://github.com/pdidev/test_env" -ARG VERSION ARG MPI -ARG SPACK_INSTALL_ARGS="--show-log-on-error --fail-fast" -COPY ${MPI}-${VERSION}.lst mpi.lst +COPY ${MPI}.lst mpi.lst RUN DEFAULT_IFS="${IFS}" \ ; IFS=$'\n' \ ; set -f \ ; for LIB in $(cat mpi.lst)\ ; do IFS="${DEFAULT_IFS}" spack -e pdienv add -l mpi "${LIB}" \ ; done -RUN spack -e pdienv concretize --reuse --force -# install & workaround openmpi issue with mixed compilers where Fortran CHARACTER detection script requires CFLAGS=-fPIE -RUN ( spack -e pdienv fetch --deprecated \ - || spack -e pdienv fetch --deprecated \ - || spack -e pdienv fetch --deprecated \ - || spack -e pdienv fetch --deprecated ) \ - && ( if ( [ 'xopenmpi' = "x${MPI}" -a 'xoldest' = "x${VERSION}" ] && grep -qs clang compiler.lst ) \ - ; then ( spack -e pdienv install --only dependencies ${SPACK_INSTALL_ARGS} openmpi \ - && export CFLAGS=-fPIE \ - && spack -e pdienv install ${SPACK_INSTALL_ARGS} --dirty openmpi ) \ - ; else true \ - ; fi ) \ - && spack -e pdienv install ${SPACK_INSTALL_ARGS} \ + + +ARG SPACK_INSTALL_ARGS="--show-log-on-error --fail-fast" + +RUN spack -e pdienv concretize -fU \ + && spack clean -a +RUN spack -e pdienv fetch \ + || spack -e pdienv fetch \ + || spack -e pdienv fetch \ + || spack -e pdienv fetch \ + && spack clean -a +RUN spack -e pdienv install ${SPACK_INSTALL_ARGS} \ && spack clean -a + +# install & workaround openmpi issue with mixed compilers where Fortran CHARACTER detection script requires CFLAGS=-fPIE +# && ( if ( [ 'xopenmpi' = "x${MPI}" -a 'xoldest' = "x${VERSION}" ] && grep -qs clang compiler.lst ) \ +# ; then ( spack -e pdienv install --only dependencies ${SPACK_INSTALL_ARGS} openmpi \ +# && export CFLAGS=-fPIE \ +# && spack -e pdienv install ${SPACK_INSTALL_ARGS} --dirty openmpi ) \ +# ; else true \ +# ; fi ) \ diff --git a/spack/5a-mpi/openmpi-latest.lst b/spack/5a-mpi/openmpi-latest.lst deleted file mode 100644 index 99590c0..0000000 --- a/spack/5a-mpi/openmpi-latest.lst +++ /dev/null @@ -1,3 +0,0 @@ -openmpi@4.0.3: -openssh@8.1p1: -py-mpi4py@3.0.3: diff --git a/spack/5a-mpi/openmpi-oldest.lst b/spack/5a-mpi/openmpi-oldest.lst deleted file mode 100644 index d578d97..0000000 --- a/spack/5a-mpi/openmpi-oldest.lst +++ /dev/null @@ -1,3 +0,0 @@ -openmpi@4.0.3 -openssh@8.1p1 -py-mpi4py@3.0.3 diff --git a/spack/5a-mpi/openmpi.lst b/spack/5a-mpi/openmpi.lst new file mode 100644 index 0000000..d637988 --- /dev/null +++ b/spack/5a-mpi/openmpi.lst @@ -0,0 +1,3 @@ +openmpi +openssh +py-mpi4py diff --git a/spack/6-optlibs/Dockerfile b/spack/6-optlibs/Dockerfile index d2489a1..6e15bdf 100644 --- a/spack/6-optlibs/Dockerfile +++ b/spack/6-optlibs/Dockerfile @@ -19,7 +19,7 @@ RUN spack repo add --scope site ${SPACK_ROOT}/var/spack/repos/pdi ARG VERSION -COPY ${VERSION}.lst optlibs.lst +COPY optlibs.lst optlibs.lst RUN DEFAULT_IFS="${IFS}" \ @@ -29,27 +29,29 @@ RUN DEFAULT_IFS="${IFS}" \ ; do IFS="${DEFAULT_IFS}" spack -e pdienv add -l optlibs "${LIB}" \ ; done -# some package need to use a more recent cmake than that of in old env, so remove it -RUN spack -e pdienv remove -l baselibs cmake +# # some package need to use a more recent cmake than that of in old env, so remove it +# RUN spack -e pdienv remove -l baselibs cmake ARG SPACK_INSTALL_ARGS="--show-log-on-error --fail-fast" # install the libs -RUN spack -e pdienv concretize --reuse -RUN ( spack -e pdienv fetch --deprecated \ - || spack -e pdienv fetch --deprecated \ - || spack -e pdienv fetch --deprecated \ - || spack -e pdienv fetch --deprecated ) \ - && spack -e pdienv install ${SPACK_INSTALL_ARGS} \ +RUN spack -e pdienv concretize -fU \ && spack clean -a - -# add back the cmake version that was removed before -RUN spack -e pdienv add -l baselibs "$(grep '^cmake' baselibs.lst)" -RUN spack -e pdienv concretize --reuse -RUN ( spack -e pdienv fetch --deprecated \ - || spack -e pdienv fetch --deprecated \ - || spack -e pdienv fetch --deprecated \ - || spack -e pdienv fetch --deprecated ) \ - && spack -e pdienv install ${SPACK_INSTALL_ARGS} \ +RUN spack -e pdienv fetch \ + || spack -e pdienv fetch \ + || spack -e pdienv fetch \ + || spack -e pdienv fetch \ + && spack clean -a +RUN spack -e pdienv install ${SPACK_INSTALL_ARGS} \ && spack clean -a + +# # add back the cmake version that was removed before +# RUN spack -e pdienv add -l baselibs "$(grep '^cmake' baselibs.lst)" +# RUN spack -e pdienv concretize --reuse +# RUN ( spack -e pdienv fetch \ +# || spack -e pdienv fetch \ +# || spack -e pdienv fetch \ +# || spack -e pdienv fetch ) \ +# && spack -e pdienv install ${SPACK_INSTALL_ARGS} \ +# && spack clean -a diff --git a/spack/6-optlibs/latest.lst b/spack/6-optlibs/latest.lst deleted file mode 100644 index 771ffad..0000000 --- a/spack/6-optlibs/latest.lst +++ /dev/null @@ -1,12 +0,0 @@ -astyle@3.1: -doxygen@1.8.17: -flowvr@2.3.2: -fti@1.6:~hdf5~fortran -hdf5@1.10.4: -libyaml@0.2.2: -netcdf-c@4.7.3:+mpi -paraconf@1.0.0: -py-pybind11@2.4.3: -sionlib@1.7.6:~fortran -spdlog@1.5.0: ^fmt@6.1.2 -zpp@1.0.16: diff --git a/spack/6-optlibs/oldest.lst b/spack/6-optlibs/oldest.lst deleted file mode 100644 index 613592a..0000000 --- a/spack/6-optlibs/oldest.lst +++ /dev/null @@ -1,12 +0,0 @@ -astyle@3.1 -doxygen@1.8.17 -flowvr@2.3.2 -fti@1.6~hdf5~fortran -hdf5@1.10.4 -libyaml@0.2.2 -netcdf-c@4.7.3+mpi -paraconf@1.0.0 -py-pybind11@2.4.3 -sionlib@1.7.6~fortran -spdlog@1.5.0 ^fmt@6.1.2 -zpp@1.0.16 diff --git a/spack/6-optlibs/optlibs.lst b/spack/6-optlibs/optlibs.lst new file mode 100644 index 0000000..b9da6cd --- /dev/null +++ b/spack/6-optlibs/optlibs.lst @@ -0,0 +1,12 @@ +doxygen +flowvr +fmt +fti +hdf5 +libyaml +netcdf-c +paraconf +py-pybind11 +sionlib +spdlog +zpp