From d97c7cb032b9e12cb0017a0277a58d59e025a369 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 8 Mar 2023 19:31:45 +0100 Subject: [PATCH 01/14] Add amzn2023-x86_64_v2 --- .../linux-amzn2023-x86_64_v2/Dockerfile | 63 +++++++++++++++++++ .../linux-amzn2023-x86_64_v2/compilers.yaml | 32 ++++++++++ .../linux-amzn2023-x86_64_v2/packages.yaml | 3 + spack.yaml | 10 ++- 4 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile create mode 100644 Dockerfiles/linux-amzn2023-x86_64_v2/compilers.yaml create mode 100644 Dockerfiles/linux-amzn2023-x86_64_v2/packages.yaml diff --git a/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile b/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile new file mode 100644 index 0000000..feac0a1 --- /dev/null +++ b/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile @@ -0,0 +1,63 @@ +FROM amazonlinux:2023 as build + +WORKDIR /root + +ENV LC_ALL=C \ + PATH=/root/tools/bin:/root/spack/bin:/usr/bin:/bin + +RUN yum install -y \ + bzip2 \ + clang \ + git \ + lld \ + make \ + patch \ + python \ + tar \ + unzip \ + xz + +RUN mkdir spack && \ + cd spack && \ + curl -Lfs https://github.com/spack/spack/archive/refs/heads/develop.tar.gz | tar -xzf - --strip-components=1 -C . && \ + curl -Lfs https://github.com/spack/spack/pull/34926.patch | patch -p1 && \ + curl -Lfs https://github.com/spack/spack/pull/35020.patch | patch -p1 && \ + curl -Lfs https://github.com/spack/spack/pull/35078.patch | patch -p1 && \ + curl -Lfs https://github.com/spack/spack/pull/35174.patch | patch -p1 && \ + true + +ADD spack.yaml Makefile /root/ + +ADD linux-amzn2023-x86_64_v2/compilers.yaml linux-amzn2023-x86_64_v2/packages.yaml /root/spack/etc/spack + +# Assume system make is too old +RUN spack env create --with-view /root/tools tools && \ + spack -e tools add gmake@4.4 && \ + spack -e tools concretize && \ + spack -e tools install + +RUN --mount=type=cache,target=/buildcache \ + --mount=type=cache,target=/root/.spack/cache \ + spack mirror add cache /buildcache && \ + make -j$(nproc) BUILDCACHE=/buildcache + +# Remove Spack metadata / Python cache to save some bytes +RUN find -L /opt/spack -type d \( -name '__pycache__' -or -name '.spack' \) -exec rm -rf {} + && \ + find -L /opt/spack -type f -name '*.a' -exec rm -rf {} + + +# Stage 2, create a small(er) docker image +FROM amazonlinux:2023 + +ENV NVIDIA_VISIBLE_DEVICES=all \ + NVIDIA_DRIVER_CAPABILITIES=compute,utility \ + LANGUAGE=en_US:en \ + LANG=en_US.UTF-8 \ + LC_ALL=en_US.UTF-8 \ + PATH=/opt/spack/view/bin:/root/spack/bin:$PATH + +COPY --from=build /opt/spack /opt/spack + +# We stick to system compilers & linkers +RUN yum install -y gcc g++ gfortran binutils && \ + yum clean all && \ + rm -rf /var/cache/yum/* diff --git a/Dockerfiles/linux-amzn2023-x86_64_v2/compilers.yaml b/Dockerfiles/linux-amzn2023-x86_64_v2/compilers.yaml new file mode 100644 index 0000000..0ad13bc --- /dev/null +++ b/Dockerfiles/linux-amzn2023-x86_64_v2/compilers.yaml @@ -0,0 +1,32 @@ +compilers: +- compiler: + spec: clang@15.0.6 + paths: + cc: /usr/bin/clang + cxx: /usr/bin/clang++ + f77: null + fc: null + flags: + cxxflags: '-O3 -g0' + cflags: '-O3 -g0' + ldflags: '-fuse-ld=lld -Wl,-O3' + operating_system: amzn2023 + target: x86_64 + modules: [] + environment: {} + extra_rpaths: [] +- compiler: + spec: gcc@11.3.1 + paths: + cc: /usr/bin/gcc + cxx: /usr/bin/g++ + f77: null + fc: null + flags: + cxxflags: '-O3 -g0' + cflags: '-O3 -g0' + operating_system: amzn2023 + target: x86_64 + modules: [] + environment: {} + extra_rpaths: [] diff --git a/Dockerfiles/linux-amzn2023-x86_64_v2/packages.yaml b/Dockerfiles/linux-amzn2023-x86_64_v2/packages.yaml new file mode 100644 index 0000000..429db70 --- /dev/null +++ b/Dockerfiles/linux-amzn2023-x86_64_v2/packages.yaml @@ -0,0 +1,3 @@ +packages: + all: + require: target=x86_64_v2 \ No newline at end of file diff --git a/spack.yaml b/spack.yaml index 0d993c2..94b0c12 100644 --- a/spack.yaml +++ b/spack.yaml @@ -1,6 +1,7 @@ spack: view: false specs: + - 'awscli' - 'clingo-bootstrap@spack +optimized' - 'curl' - 'file' @@ -13,7 +14,7 @@ spack: - 'patch' - 'patchelf' - 'py-boto3' - - 'python@3.11 %clang +optimizations' + - 'python@3.11 %clang +optimizations +zlib_ng' - 'tar' - 'unzip' - 'vim' @@ -23,4 +24,9 @@ spack: install_tree: root: /opt/spack/store concretizer: - unify: true \ No newline at end of file + unify: true + packages: + all: + variants: ~nls + zlib: + variants: ~shared From a27e99a64507a00afe0ba853d1954d634c8b8901 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 8 Mar 2023 19:34:51 +0100 Subject: [PATCH 02/14] also set LC_ALL=en_US.UTF-8 uniformly --- Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile b/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile index 9cf7141..cd14feb 100644 --- a/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile +++ b/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile @@ -54,7 +54,9 @@ RUN find -L /opt/spack -type d \( -name '__pycache__' -or -name '.spack' \) -exe FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive \ - LC_ALL=C \ + LANGUAGE=en_US:en \ + LANG=en_US.UTF-8 \ + LC_ALL=en_US.UTF-8 \ PATH=/opt/spack/view/bin:/root/spack/bin:$PATH COPY --from=build /opt/spack /opt/spack From 58766d8acae07888292fd02a51bfcd150d1bb90c Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 8 Mar 2023 19:35:54 +0100 Subject: [PATCH 03/14] add to ci --- .github/workflows/containers.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index db63463..47d98e3 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -34,6 +34,7 @@ jobs: dockerfile: [[e4s-ubuntu-18.04, e4s-ubuntu-18.04.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'], [e4s-ubuntu-20.04, e4s-ubuntu-20.04.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'], [linux-ubuntu22.04-x86_64_v2, linux-ubuntu22.04-x86_64_v2/Dockerfile, 'linux/amd64'], + [linux-amzn2023-x86_64_v2, linux-amzn2023-x86_64_v2/Dockerfile, 'linux/amd64'], [e4s-amazonlinux-2, e4s-amazonlinux-2.dockerfile, 'linux/amd64,linux/arm64'], [e4s-centos-7, e4s-centos-7.dockerfile, 'linux/amd64'], [e4s-fedora-36, e4s-fedora-36.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64']] From 82c9749200d9ca0d0517b3919e3e054391364842 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 8 Mar 2023 19:42:01 +0100 Subject: [PATCH 04/14] use makefile --- .../linux-amzn2023-x86_64_v2/Dockerfile | 4 +-- .../linux-ubuntu22.04-x86_64_v2/Dockerfile | 13 +++++---- build.mk | 27 +++++++++++++++++++ 3 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 build.mk diff --git a/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile b/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile index feac0a1..b7d1f38 100644 --- a/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile +++ b/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile @@ -26,7 +26,7 @@ RUN mkdir spack && \ curl -Lfs https://github.com/spack/spack/pull/35174.patch | patch -p1 && \ true -ADD spack.yaml Makefile /root/ +ADD spack.yaml build.mk /root/ ADD linux-amzn2023-x86_64_v2/compilers.yaml linux-amzn2023-x86_64_v2/packages.yaml /root/spack/etc/spack @@ -39,7 +39,7 @@ RUN spack env create --with-view /root/tools tools && \ RUN --mount=type=cache,target=/buildcache \ --mount=type=cache,target=/root/.spack/cache \ spack mirror add cache /buildcache && \ - make -j$(nproc) BUILDCACHE=/buildcache + make -f build.mk -j$(nproc) BUILDCACHE=/buildcache # Remove Spack metadata / Python cache to save some bytes RUN find -L /opt/spack -type d \( -name '__pycache__' -or -name '.spack' \) -exec rm -rf {} + && \ diff --git a/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile b/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile index cd14feb..1c7826c 100644 --- a/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile +++ b/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile @@ -30,7 +30,8 @@ RUN mkdir spack && \ curl -Lfs https://github.com/spack/spack/pull/35020.patch | patch -p1 && \ true -ADD spack.yaml /root/ +ADD spack.yaml build.mk /root/ + ADD Dockerfiles/linux-ubuntu22.04-x86_64_v2/compilers.yaml Dockerfiles/linux-ubuntu22.04-x86_64_v2/packages.yaml /root/spack/etc/spack/ # Assume system make is too old @@ -39,12 +40,10 @@ RUN spack env create --with-view /root/tools tools && \ spack -e tools concretize && \ spack -e tools install - -RUN --mount=type=cache,target=/root/.spack/cache \ - spack -e . concretize -f && \ - spack -e . install && \ - spack -e . gc --yes-to-all && \ - spack -e . env view --link run enable /opt/spack/view +RUN --mount=type=cache,target=/buildcache \ + --mount=type=cache,target=/root/.spack/cache \ + spack mirror add cache /buildcache && \ + make -f build.mk -j$(nproc) BUILDCACHE=/buildcache # Remove Spack metadata, python cache and static libraries to save some bytes RUN find -L /opt/spack -type d \( -name '__pycache__' -or -name '.spack' \) -exec rm -rf {} + && \ diff --git a/build.mk b/build.mk new file mode 100644 index 0000000..54fff70 --- /dev/null +++ b/build.mk @@ -0,0 +1,27 @@ +SPACK ?= spack +SPACK_INSTALL_FLAGS += --no-check-signature +BUILDCACHE = $(CURDIR)/buildcache +MAKEFLAGS += -Orecurse + +export SPACK_COLOR = always +export SPACK_BACKTRACE = yes + +.PHONY: all + +all: push + $(SPACK) -e . gc --yes-to-all + $(SPACK) -e . env view --link run enable /opt/spack/view + +include env.mk + +spack.lock: spack.yaml + $(SPACK) -e . concretize -f + +env.mk: spack.lock + $(SPACK) -e . env depfile -o $@ --make-prefix spack + +spack/push/%: spack/install/% + $(SPACK) -e . buildcache create --unsigned --allow-root --only=package $(BUILDCACHE) /$(HASH) # push $(SPEC) + +push: $(addprefix spack/push/,$(spack/SPACK_PACKAGE_IDS)) + $(SPACK) -e . buildcache update-index $(BUILDCACHE) \ No newline at end of file From d1bbc8bbfb4b174358fea613d58216d3ecb1b418 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 8 Mar 2023 20:48:10 +0100 Subject: [PATCH 05/14] fixes --- Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile | 2 +- Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile b/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile index b7d1f38..bbd6922 100644 --- a/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile +++ b/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile @@ -28,7 +28,7 @@ RUN mkdir spack && \ ADD spack.yaml build.mk /root/ -ADD linux-amzn2023-x86_64_v2/compilers.yaml linux-amzn2023-x86_64_v2/packages.yaml /root/spack/etc/spack +ADD Dockerfiles/linux-amzn2023-x86_64_v2/compilers.yaml Dockerfiles/linux-amzn2023-x86_64_v2/packages.yaml /root/spack/etc/spack # Assume system make is too old RUN spack env create --with-view /root/tools tools && \ diff --git a/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile b/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile index 1c7826c..4251a95 100644 --- a/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile +++ b/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile @@ -28,6 +28,8 @@ RUN mkdir spack && \ curl -Lfs https://github.com/spack/spack/archive/refs/heads/develop.tar.gz | tar -xzf - --strip-components=1 -C . && \ curl -Lfs https://github.com/spack/spack/pull/34926.patch | patch -p1 && \ curl -Lfs https://github.com/spack/spack/pull/35020.patch | patch -p1 && \ + curl -Lfs https://github.com/spack/spack/pull/35078.patch | patch -p1 && \ + curl -Lfs https://github.com/spack/spack/pull/35174.patch | patch -p1 && \ true ADD spack.yaml build.mk /root/ From 48c10b0ea382193b1ba68a9bb0749390a061107f Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 8 Mar 2023 23:32:48 +0100 Subject: [PATCH 06/14] locale --- Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile | 5 ++--- Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile b/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile index bbd6922..e9ef609 100644 --- a/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile +++ b/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile @@ -50,9 +50,8 @@ FROM amazonlinux:2023 ENV NVIDIA_VISIBLE_DEVICES=all \ NVIDIA_DRIVER_CAPABILITIES=compute,utility \ - LANGUAGE=en_US:en \ - LANG=en_US.UTF-8 \ - LC_ALL=en_US.UTF-8 \ + LANG=C.UTF-8 \ + LC_ALL=C.UTF-8 PATH=/opt/spack/view/bin:/root/spack/bin:$PATH COPY --from=build /opt/spack /opt/spack diff --git a/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile b/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile index 4251a95..810b60d 100644 --- a/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile +++ b/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile @@ -55,9 +55,8 @@ RUN find -L /opt/spack -type d \( -name '__pycache__' -or -name '.spack' \) -exe FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive \ - LANGUAGE=en_US:en \ - LANG=en_US.UTF-8 \ - LC_ALL=en_US.UTF-8 \ + LANG=C.UTF-8 \ + LC_ALL=C.UTF-8 PATH=/opt/spack/view/bin:/root/spack/bin:$PATH COPY --from=build /opt/spack /opt/spack From b76a83e58e92afad730239c943aaa1b990c11d7d Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 9 Mar 2023 08:57:04 +0100 Subject: [PATCH 07/14] env --- Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile | 5 +++-- Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile b/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile index e9ef609..c586332 100644 --- a/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile +++ b/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile @@ -2,7 +2,8 @@ FROM amazonlinux:2023 as build WORKDIR /root -ENV LC_ALL=C \ +ENV LANG=C.UTF-8 \ + LC_ALL=C.UTF-8 \ PATH=/root/tools/bin:/root/spack/bin:/usr/bin:/bin RUN yum install -y \ @@ -51,7 +52,7 @@ FROM amazonlinux:2023 ENV NVIDIA_VISIBLE_DEVICES=all \ NVIDIA_DRIVER_CAPABILITIES=compute,utility \ LANG=C.UTF-8 \ - LC_ALL=C.UTF-8 + LC_ALL=C.UTF-8 \ PATH=/opt/spack/view/bin:/root/spack/bin:$PATH COPY --from=build /opt/spack /opt/spack diff --git a/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile b/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile index 810b60d..70c8c07 100644 --- a/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile +++ b/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile @@ -56,7 +56,7 @@ FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive \ LANG=C.UTF-8 \ - LC_ALL=C.UTF-8 + LC_ALL=C.UTF-8 \ PATH=/opt/spack/view/bin:/root/spack/bin:$PATH COPY --from=build /opt/spack /opt/spack From c52e9222e09f33912b03c28ec5575ee2a95c8b97 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 9 Mar 2023 09:24:14 +0100 Subject: [PATCH 08/14] also arm --- .github/workflows/containers.yml | 4 ++-- Dockerfiles/linux-amzn2023-x86_64_v2/packages.yaml | 3 --- .../Dockerfile | 2 +- .../compilers.yaml | 0 Dockerfiles/linux-ubuntu22.04-x86_64_v2/packages.yaml | 3 --- .../Dockerfile | 2 +- .../compilers.yaml | 0 spack.yaml | 7 ++++++- 8 files changed, 10 insertions(+), 11 deletions(-) delete mode 100644 Dockerfiles/linux-amzn2023-x86_64_v2/packages.yaml rename Dockerfiles/{linux-amzn2023-x86_64_v2 => linux-amzn2023}/Dockerfile (93%) rename Dockerfiles/{linux-amzn2023-x86_64_v2 => linux-amzn2023}/compilers.yaml (100%) delete mode 100644 Dockerfiles/linux-ubuntu22.04-x86_64_v2/packages.yaml rename Dockerfiles/{linux-ubuntu22.04-x86_64_v2 => linux-ubuntu22.04}/Dockerfile (93%) rename Dockerfiles/{linux-ubuntu22.04-x86_64_v2 => linux-ubuntu22.04}/compilers.yaml (100%) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 47d98e3..30ef33d 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -33,8 +33,8 @@ jobs: matrix: dockerfile: [[e4s-ubuntu-18.04, e4s-ubuntu-18.04.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'], [e4s-ubuntu-20.04, e4s-ubuntu-20.04.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'], - [linux-ubuntu22.04-x86_64_v2, linux-ubuntu22.04-x86_64_v2/Dockerfile, 'linux/amd64'], - [linux-amzn2023-x86_64_v2, linux-amzn2023-x86_64_v2/Dockerfile, 'linux/amd64'], + [linux-ubuntu22.04, linux-ubuntu22.04/Dockerfile, 'linux/amd64,linux/arm64'], + [linux-amzn2023, linux-amzn2023/Dockerfile, 'linux/amd64,linux/arm64'], [e4s-amazonlinux-2, e4s-amazonlinux-2.dockerfile, 'linux/amd64,linux/arm64'], [e4s-centos-7, e4s-centos-7.dockerfile, 'linux/amd64'], [e4s-fedora-36, e4s-fedora-36.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64']] diff --git a/Dockerfiles/linux-amzn2023-x86_64_v2/packages.yaml b/Dockerfiles/linux-amzn2023-x86_64_v2/packages.yaml deleted file mode 100644 index 429db70..0000000 --- a/Dockerfiles/linux-amzn2023-x86_64_v2/packages.yaml +++ /dev/null @@ -1,3 +0,0 @@ -packages: - all: - require: target=x86_64_v2 \ No newline at end of file diff --git a/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile b/Dockerfiles/linux-amzn2023/Dockerfile similarity index 93% rename from Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile rename to Dockerfiles/linux-amzn2023/Dockerfile index c586332..e92620b 100644 --- a/Dockerfiles/linux-amzn2023-x86_64_v2/Dockerfile +++ b/Dockerfiles/linux-amzn2023/Dockerfile @@ -29,7 +29,7 @@ RUN mkdir spack && \ ADD spack.yaml build.mk /root/ -ADD Dockerfiles/linux-amzn2023-x86_64_v2/compilers.yaml Dockerfiles/linux-amzn2023-x86_64_v2/packages.yaml /root/spack/etc/spack +ADD Dockerfiles/linux-amzn2023-x86_64_v2/compilers.yaml /root/spack/etc/spack # Assume system make is too old RUN spack env create --with-view /root/tools tools && \ diff --git a/Dockerfiles/linux-amzn2023-x86_64_v2/compilers.yaml b/Dockerfiles/linux-amzn2023/compilers.yaml similarity index 100% rename from Dockerfiles/linux-amzn2023-x86_64_v2/compilers.yaml rename to Dockerfiles/linux-amzn2023/compilers.yaml diff --git a/Dockerfiles/linux-ubuntu22.04-x86_64_v2/packages.yaml b/Dockerfiles/linux-ubuntu22.04-x86_64_v2/packages.yaml deleted file mode 100644 index 68db84b..0000000 --- a/Dockerfiles/linux-ubuntu22.04-x86_64_v2/packages.yaml +++ /dev/null @@ -1,3 +0,0 @@ -packages: - all: - require: target=x86_64_v2 diff --git a/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile b/Dockerfiles/linux-ubuntu22.04/Dockerfile similarity index 93% rename from Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile rename to Dockerfiles/linux-ubuntu22.04/Dockerfile index 70c8c07..887629f 100644 --- a/Dockerfiles/linux-ubuntu22.04-x86_64_v2/Dockerfile +++ b/Dockerfiles/linux-ubuntu22.04/Dockerfile @@ -34,7 +34,7 @@ RUN mkdir spack && \ ADD spack.yaml build.mk /root/ -ADD Dockerfiles/linux-ubuntu22.04-x86_64_v2/compilers.yaml Dockerfiles/linux-ubuntu22.04-x86_64_v2/packages.yaml /root/spack/etc/spack/ +ADD Dockerfiles/linux-ubuntu22.04-x86_64_v2/compilers.yaml /root/spack/etc/spack/ # Assume system make is too old RUN spack env create --with-view /root/tools tools && \ diff --git a/Dockerfiles/linux-ubuntu22.04-x86_64_v2/compilers.yaml b/Dockerfiles/linux-ubuntu22.04/compilers.yaml similarity index 100% rename from Dockerfiles/linux-ubuntu22.04-x86_64_v2/compilers.yaml rename to Dockerfiles/linux-ubuntu22.04/compilers.yaml diff --git a/spack.yaml b/spack.yaml index 94b0c12..8d3ff95 100644 --- a/spack.yaml +++ b/spack.yaml @@ -4,7 +4,7 @@ spack: - 'awscli' - 'clingo-bootstrap@spack +optimized' - 'curl' - - 'file' + - file - 'git' - 'gmake@4.4:' - 'gnupg' @@ -28,5 +28,10 @@ spack: packages: all: variants: ~nls + require: + - one_of: + - target=x86_64_v2 + - target=aarch64 + - target=ppc64le zlib: variants: ~shared From 7b4a73c28d48a31a58f122e1e1336faf1ae7190d Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 9 Mar 2023 10:16:34 +0100 Subject: [PATCH 09/14] duplicate compilers because spack likes redundancy :( --- Dockerfiles/linux-amzn2023/compilers.yaml | 27 ++++++++++++++--- Dockerfiles/linux-ubuntu22.04/compilers.yaml | 32 ++++++++++++++++++++ 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/Dockerfiles/linux-amzn2023/compilers.yaml b/Dockerfiles/linux-amzn2023/compilers.yaml index 0ad13bc..7e16e6a 100644 --- a/Dockerfiles/linux-amzn2023/compilers.yaml +++ b/Dockerfiles/linux-amzn2023/compilers.yaml @@ -1,3 +1,5 @@ +# A whole lot of nonsense just to set compiler flags :( + compilers: - compiler: spec: clang@15.0.6 @@ -16,17 +18,34 @@ compilers: environment: {} extra_rpaths: [] - compiler: - spec: gcc@11.3.1 + spec: clang@15.0.6 paths: - cc: /usr/bin/gcc - cxx: /usr/bin/g++ + cc: /usr/bin/clang + cxx: /usr/bin/clang++ f77: null fc: null flags: cxxflags: '-O3 -g0' cflags: '-O3 -g0' + ldflags: '-fuse-ld=lld -Wl,-O3' operating_system: amzn2023 - target: x86_64 + target: aarch64 + modules: [] + environment: {} + extra_rpaths: [] +- compiler: + spec: clang@15.0.6 + paths: + cc: /usr/bin/clang + cxx: /usr/bin/clang++ + f77: null + fc: null + flags: + cxxflags: '-O3 -g0' + cflags: '-O3 -g0' + ldflags: '-fuse-ld=lld -Wl,-O3' + operating_system: amzn2023 + target: ppc64le modules: [] environment: {} extra_rpaths: [] diff --git a/Dockerfiles/linux-ubuntu22.04/compilers.yaml b/Dockerfiles/linux-ubuntu22.04/compilers.yaml index 2b3e40d..fb56e88 100644 --- a/Dockerfiles/linux-ubuntu22.04/compilers.yaml +++ b/Dockerfiles/linux-ubuntu22.04/compilers.yaml @@ -14,4 +14,36 @@ compilers: target: x86_64 modules: [] environment: {} + extra_rpaths: [] +- compiler: + spec: clang@14.0.0 + paths: + cc: /usr/bin/clang + cxx: /usr/bin/clang++ + f77: null + fc: null + flags: + cxxflags: '-O3 -g0 -ffunction-sections' + cflags: '-O3 -g0 -ffunction-sections' + ldflags: '-fuse-ld=lld -Wl,-O3' + operating_system: ubuntu22.04 + target: aarch64 + modules: [] + environment: {} + extra_rpaths: [] +- compiler: + spec: clang@14.0.0 + paths: + cc: /usr/bin/clang + cxx: /usr/bin/clang++ + f77: null + fc: null + flags: + cxxflags: '-O3 -g0 -ffunction-sections' + cflags: '-O3 -g0 -ffunction-sections' + ldflags: '-fuse-ld=lld -Wl,-O3' + operating_system: ubuntu22.04 + target: ppc64le + modules: [] + environment: {} extra_rpaths: [] \ No newline at end of file From 14311c464327846bc2317179cbbc60dfe4b01c50 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 9 Mar 2023 10:20:55 +0100 Subject: [PATCH 10/14] formatting --- spack.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spack.yaml b/spack.yaml index 8d3ff95..1312159 100644 --- a/spack.yaml +++ b/spack.yaml @@ -4,7 +4,7 @@ spack: - 'awscli' - 'clingo-bootstrap@spack +optimized' - 'curl' - - file + - 'file' - 'git' - 'gmake@4.4:' - 'gnupg' From d0d23623fbd4f53f3557c0658bc5749578f7ad9f Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 9 Mar 2023 11:00:14 +0100 Subject: [PATCH 11/14] looks like target is optional... lets see --- Dockerfiles/linux-amzn2023/compilers.yaml | 37 +------------------- Dockerfiles/linux-ubuntu22.04/compilers.yaml | 37 +------------------- 2 files changed, 2 insertions(+), 72 deletions(-) diff --git a/Dockerfiles/linux-amzn2023/compilers.yaml b/Dockerfiles/linux-amzn2023/compilers.yaml index 7e16e6a..920316f 100644 --- a/Dockerfiles/linux-amzn2023/compilers.yaml +++ b/Dockerfiles/linux-amzn2023/compilers.yaml @@ -1,5 +1,3 @@ -# A whole lot of nonsense just to set compiler flags :( - compilers: - compiler: spec: clang@15.0.6 @@ -13,39 +11,6 @@ compilers: cflags: '-O3 -g0' ldflags: '-fuse-ld=lld -Wl,-O3' operating_system: amzn2023 - target: x86_64 modules: [] environment: {} - extra_rpaths: [] -- compiler: - spec: clang@15.0.6 - paths: - cc: /usr/bin/clang - cxx: /usr/bin/clang++ - f77: null - fc: null - flags: - cxxflags: '-O3 -g0' - cflags: '-O3 -g0' - ldflags: '-fuse-ld=lld -Wl,-O3' - operating_system: amzn2023 - target: aarch64 - modules: [] - environment: {} - extra_rpaths: [] -- compiler: - spec: clang@15.0.6 - paths: - cc: /usr/bin/clang - cxx: /usr/bin/clang++ - f77: null - fc: null - flags: - cxxflags: '-O3 -g0' - cflags: '-O3 -g0' - ldflags: '-fuse-ld=lld -Wl,-O3' - operating_system: amzn2023 - target: ppc64le - modules: [] - environment: {} - extra_rpaths: [] + extra_rpaths: [] \ No newline at end of file diff --git a/Dockerfiles/linux-ubuntu22.04/compilers.yaml b/Dockerfiles/linux-ubuntu22.04/compilers.yaml index fb56e88..c696e86 100644 --- a/Dockerfiles/linux-ubuntu22.04/compilers.yaml +++ b/Dockerfiles/linux-ubuntu22.04/compilers.yaml @@ -11,39 +11,4 @@ compilers: cflags: '-O3 -g0 -ffunction-sections' ldflags: '-fuse-ld=lld -Wl,-O3' operating_system: ubuntu22.04 - target: x86_64 - modules: [] - environment: {} - extra_rpaths: [] -- compiler: - spec: clang@14.0.0 - paths: - cc: /usr/bin/clang - cxx: /usr/bin/clang++ - f77: null - fc: null - flags: - cxxflags: '-O3 -g0 -ffunction-sections' - cflags: '-O3 -g0 -ffunction-sections' - ldflags: '-fuse-ld=lld -Wl,-O3' - operating_system: ubuntu22.04 - target: aarch64 - modules: [] - environment: {} - extra_rpaths: [] -- compiler: - spec: clang@14.0.0 - paths: - cc: /usr/bin/clang - cxx: /usr/bin/clang++ - f77: null - fc: null - flags: - cxxflags: '-O3 -g0 -ffunction-sections' - cflags: '-O3 -g0 -ffunction-sections' - ldflags: '-fuse-ld=lld -Wl,-O3' - operating_system: ubuntu22.04 - target: ppc64le - modules: [] - environment: {} - extra_rpaths: [] \ No newline at end of file + modules: [] \ No newline at end of file From 444dd917b561dff9f184f2919dedffc95fc8102d Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 9 Mar 2023 12:05:47 +0100 Subject: [PATCH 12/14] paths --- Dockerfiles/linux-amzn2023/Dockerfile | 2 +- Dockerfiles/linux-ubuntu22.04/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfiles/linux-amzn2023/Dockerfile b/Dockerfiles/linux-amzn2023/Dockerfile index e92620b..726558a 100644 --- a/Dockerfiles/linux-amzn2023/Dockerfile +++ b/Dockerfiles/linux-amzn2023/Dockerfile @@ -29,7 +29,7 @@ RUN mkdir spack && \ ADD spack.yaml build.mk /root/ -ADD Dockerfiles/linux-amzn2023-x86_64_v2/compilers.yaml /root/spack/etc/spack +ADD Dockerfiles/linux-amzn2023/compilers.yaml /root/spack/etc/spack # Assume system make is too old RUN spack env create --with-view /root/tools tools && \ diff --git a/Dockerfiles/linux-ubuntu22.04/Dockerfile b/Dockerfiles/linux-ubuntu22.04/Dockerfile index 887629f..d9cdae1 100644 --- a/Dockerfiles/linux-ubuntu22.04/Dockerfile +++ b/Dockerfiles/linux-ubuntu22.04/Dockerfile @@ -34,7 +34,7 @@ RUN mkdir spack && \ ADD spack.yaml build.mk /root/ -ADD Dockerfiles/linux-ubuntu22.04-x86_64_v2/compilers.yaml /root/spack/etc/spack/ +ADD Dockerfiles/linux-ubuntu22.04/compilers.yaml /root/spack/etc/spack/ # Assume system make is too old RUN spack env create --with-view /root/tools tools && \ From 2d5b19d66280bab02b706ccbce1dcbbdb3f86894 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 9 Mar 2023 12:05:56 +0100 Subject: [PATCH 13/14] ci test --- .github/workflows/containers.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 30ef33d..a265ff4 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -31,13 +31,15 @@ jobs: # A matrix of Dockerfile paths, associated tags, and which architectures # they support. matrix: - dockerfile: [[e4s-ubuntu-18.04, e4s-ubuntu-18.04.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'], - [e4s-ubuntu-20.04, e4s-ubuntu-20.04.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'], - [linux-ubuntu22.04, linux-ubuntu22.04/Dockerfile, 'linux/amd64,linux/arm64'], - [linux-amzn2023, linux-amzn2023/Dockerfile, 'linux/amd64,linux/arm64'], - [e4s-amazonlinux-2, e4s-amazonlinux-2.dockerfile, 'linux/amd64,linux/arm64'], - [e4s-centos-7, e4s-centos-7.dockerfile, 'linux/amd64'], - [e4s-fedora-36, e4s-fedora-36.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64']] + dockerfile: [ + # [e4s-ubuntu-18.04, e4s-ubuntu-18.04.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'], + # [e4s-ubuntu-20.04, e4s-ubuntu-20.04.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'], + [linux-ubuntu22.04, linux-ubuntu22.04/Dockerfile, 'linux/amd64,linux/arm64'], + [linux-amzn2023, linux-amzn2023/Dockerfile, 'linux/amd64,linux/arm64'], + # [e4s-amazonlinux-2, e4s-amazonlinux-2.dockerfile, 'linux/amd64,linux/arm64'], + # [e4s-centos-7, e4s-centos-7.dockerfile, 'linux/amd64'], + # [e4s-fedora-36, e4s-fedora-36.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'] + ] name: Build ${{ matrix.dockerfile[0] }} steps: - name: Checkout From 82aae0b1d34f81f005be6c4219b2da65b8102473 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 9 Mar 2023 15:09:35 +0100 Subject: [PATCH 14/14] bring back all --- .github/workflows/containers.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index a265ff4..531c316 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -32,13 +32,13 @@ jobs: # they support. matrix: dockerfile: [ - # [e4s-ubuntu-18.04, e4s-ubuntu-18.04.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'], - # [e4s-ubuntu-20.04, e4s-ubuntu-20.04.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'], - [linux-ubuntu22.04, linux-ubuntu22.04/Dockerfile, 'linux/amd64,linux/arm64'], - [linux-amzn2023, linux-amzn2023/Dockerfile, 'linux/amd64,linux/arm64'], - # [e4s-amazonlinux-2, e4s-amazonlinux-2.dockerfile, 'linux/amd64,linux/arm64'], - # [e4s-centos-7, e4s-centos-7.dockerfile, 'linux/amd64'], - # [e4s-fedora-36, e4s-fedora-36.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'] + [e4s-ubuntu-18.04, e4s-ubuntu-18.04.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'], + [e4s-ubuntu-20.04, e4s-ubuntu-20.04.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'], + [linux-ubuntu22.04, linux-ubuntu22.04/Dockerfile, 'linux/amd64/v2,linux/arm64'], + [linux-amzn2023, linux-amzn2023/Dockerfile, 'linux/amd64/v2,linux/arm64'], + [e4s-amazonlinux-2, e4s-amazonlinux-2.dockerfile, 'linux/amd64,linux/arm64'], + [e4s-centos-7, e4s-centos-7.dockerfile, 'linux/amd64'], + [e4s-fedora-36, e4s-fedora-36.dockerfile, 'linux/amd64,linux/ppc64le,linux/arm64'] ] name: Build ${{ matrix.dockerfile[0] }} steps: