From 2e713fc387bd4668b8c6a11ad9cfce9433bfa925 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Mon, 24 Jun 2024 22:55:37 +0200 Subject: [PATCH 1/2] Make sure we build multiplatform. --- Makefile | 43 +++++++++++++++++++++++++++-------------- dependencies/Dockerfile | 14 +++++++------- jammy/Dockerfile | 10 ++++++++++ 3 files changed, 45 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index c4b4351..0905289 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ # Use no-cache option to force rebuild # DOCKER_BUILD=docker build --no-cache DOCKER_BUILD=docker build +DOCKER_BUILD=docker buildx build --push --platform linux/amd64,linux/arm64 --output type=registry # Repos: # ppa:ginggs/deal.ii-backports @@ -101,26 +102,23 @@ dependencies-focal-v9.3.0: dependencies-focal: $(DOCKER_BUILD) -t dealii/dependencies:focal \ --build-arg IMG=focal \ - --build-arg VERSION=9.4.0-1ubuntu2~bpo20.04.1~ppa1 \ - --build-arg REPO=ppa:ginggs/deal.ii-9.4.0-backports \ - --build-arg CLANG_VERSION=11 \ + --build-arg VERSION=9.5.1-1~ubuntu20.04.1~ppa1 \ + --build-arg REPO=ppa:ginggs/deal.ii-9.5.1-backports \ + --build-arg CLANG_VERSION=16 \ --build-arg CLANG_REPO=https://github.com/dealii/dealii/releases/download/v9.3.0/ \ dependencies docker push dealii/dependencies:focal dependencies-jammy: - $(DOCKER_BUILD) -t dealii/dependencies:jammy \ + $(DOCKER_BUILD) \ + -t dealii/dependencies:jammy \ + -t dealii/dependencies:latest \ --build-arg IMG=jammy \ - --build-arg VERSION=9.4.0-1ubuntu2~bpo22.04.1~ppa1 \ - --build-arg REPO=ppa:ginggs/deal.ii-9.4.0-backports \ - --build-arg CLANG_VERSION=11 \ - --build-arg CLANG_REPO=https://github.com/dealii/dealii/releases/download/v9.3.0/ \ + --build-arg VERSION=9.5.1-1~ubuntu22.04.1~ppa2 \ + --build-arg REPO=ppa:ginggs/deal.ii-9.5.1-backports \ + --build-arg CLANG_VERSION=16 \ + --build-arg CLANG_REPO=https://github.com/dealii/dealii/releases/download/v9.5.1/ \ dependencies - docker push dealii/dependencies:jammy - docker tag dealii/dependencies:jammy dealii/dependencies:latest - docker tag dealii/dependencies:jammy dealii/dependencies:jammy-v9.4.0 - docker push dealii/dependencies:latest - docker push dealii/dependencies:jammy-v9.4.0 v9.4.2-focal: $(DOCKER_BUILD) -t dealii/dealii:v9.4.2-focal \ @@ -153,8 +151,23 @@ v9.5.0-jammy: --build-arg PROCS=12 \ github docker push dealii/dealii:v9.5.0-jammy - docker tag dealii/dealii:v9.5.0-jammy dealii/dealii:latest - docker push dealii/dealii:latest + +v9.5.1-focal: + $(DOCKER_BUILD) -t dealii/dealii:v9.5.1-focal \ + --build-arg IMG=focal \ + --build-arg VER=v9.5.1 \ + --build-arg PROCS=12 \ + github + docker push dealii/dealii:v9.5.1-focal + +v9.5.1-jammy: + $(DOCKER_BUILD) \ + -t dealii/dealii:v9.5.1-jammy \ + -t dealii/dealii:latest \ + --build-arg IMG=jammy \ + --build-arg VER=v9.5.1 \ + --build-arg PROCS=12 \ + github all: dependencies-focal v9.5.0-focal dependencies-jammy v9.5.0-jammy diff --git a/dependencies/Dockerfile b/dependencies/Dockerfile index 57c3b12..86a61d3 100644 --- a/dependencies/Dockerfile +++ b/dependencies/Dockerfile @@ -43,8 +43,8 @@ RUN apt-get update && apt-get install -y software-properties-common \ && rm -rf /var/lib/apt/lists/* \ && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 RUN wget ${CLANG_REPO}/clang-format-${CLANG_VERSION}-linux.tar.gz \ && tar xfv clang* && cp clang-${CLANG_VERSION}/bin/clang-format /usr/local/bin/ \ @@ -106,10 +106,10 @@ RUN cd /usr/src && \ ninja install && cd ../ && rm -rf build RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 +ENV LANG=en_US.UTF-8 RUN ldconfig -ENV PYTHONPATH "/usr/local/lib/python3.8/site-packages/" +ENV PYTHONPATH="/usr/local/lib/python3.8/site-packages/" # add and enable the default user ARG USER=dealii @@ -120,7 +120,7 @@ RUN adduser $USER sudo; echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers # make sure everything is in place RUN chown -R $USER:$USER /home/$USER USER $USER -ENV HOME /home/$USER -ENV USER $USER -ENV OMPI_MCA_btl "^vader" +ENV HOME=/home/$USER +ENV USER=$USER +ENV OMPI_MCA_btl="^vader" WORKDIR $HOME diff --git a/jammy/Dockerfile b/jammy/Dockerfile index 653a822..827a713 100644 --- a/jammy/Dockerfile +++ b/jammy/Dockerfile @@ -13,6 +13,8 @@ RUN apt-get update && apt-get install -y software-properties-common \ && apt-get update && apt-get install -y \ git \ libdeal.ii-dev=$VERSION \ + libgmp-dev \ + libgtest-dev \ locales \ ninja-build \ numdiff \ @@ -30,6 +32,14 @@ RUN wget ${CLANG_REPO}/clang-format-${CLANG_VERSION}-linux.tar.gz \ && tar xfv clang* && cp clang-${CLANG_VERSION}/bin/clang-format /usr/local/bin/ \ && rm -rf clang* +# Symengine +RUN cd /usr/local/src && \ + wget https://github.com/symengine/symengine/releases/download/v0.8.1/symengine-0.8.1.tar.gz && \ + tar xvfz symengine-0.8.1.tar.gz && rm symengine-0.8.1.tar.gz &&\ + cd symengine-0.8.1 && mkdir build && cd build && \ + cmake -GNinja .. && ninja -j12 && ninja install && \ + cd .. && rm -rf build + # add and enable the default user ARG USER=dealii RUN adduser --disabled-password --gecos '' $USER From ac0d9e4f69ad36a09cbdad4d61b235e784771766 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Tue, 25 Jun 2024 00:45:01 +0200 Subject: [PATCH 2/2] Master. --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 0905289..c0af090 100644 --- a/Makefile +++ b/Makefile @@ -169,6 +169,15 @@ v9.5.1-jammy: --build-arg PROCS=12 \ github +master-jammy: + $(DOCKER_BUILD) \ + -t dealii/dealii:master-jammy \ + --build-arg IMG=jammy \ + --build-arg VER=master \ + --build-arg PROCS=6 \ + github + + all: dependencies-focal v9.5.0-focal dependencies-jammy v9.5.0-jammy .PHONY: all \