From 4bf695001e0a2e39f696f0038c3c42c108791f83 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Thu, 7 Sep 2023 09:54:17 +0200 Subject: [PATCH] Unify. --- Makefile | 34 ++++- dependencies-focal/Dockerfile | 122 ------------------ .../Dockerfile | 8 +- 3 files changed, 34 insertions(+), 130 deletions(-) delete mode 100644 dependencies-focal/Dockerfile rename {dependencies-jammy => dependencies}/Dockerfile (97%) diff --git a/Makefile b/Makefile index a22a555..c4b4351 100644 --- a/Makefile +++ b/Makefile @@ -79,39 +79,43 @@ v9.4.0-jammy: dependencies-focal-v9.2.0: $(DOCKER_BUILD) -t dealii/dependencies:focal-v9.2.0 \ + --build-arg IMG=focal \ --build-arg VERSION=9.2.0-1~ubuntu20.04.1~ppa1 \ --build-arg REPO=ppa:ginggs/deal.ii-9.2.0-backports \ --build-arg CLANG_VERSION=6 \ --build-arg CLANG_REPO=https://github.com/dealii/dealii/releases/download/v9.0.0/ \ - dependencies-focal + dependencies docker push dealii/dependencies:focal-v9.2.0 dependencies-focal-v9.3.0: $(DOCKER_BUILD) -t dealii/dependencies:focal-v9.3.0 \ + --build-arg IMG=focal \ --build-arg VERSION=9.3.0-1~ubuntu20.04.1~ppa1 \ --build-arg REPO=ppa:ginggs/deal.ii-9.3.0-backports \ --build-arg CLANG_VERSION=11 \ --build-arg CLANG_REPO=https://github.com/dealii/dealii/releases/download/v9.3.0/ \ - dependencies-focal + dependencies docker tag dealii/dependencies:focal dealii/dependencies:focal-v9.3.0 docker push dealii/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 CLANG_REPO=https://github.com/dealii/dealii/releases/download/v9.3.0/ \ - dependencies-focal + dependencies docker push dealii/dependencies:focal dependencies-jammy: $(DOCKER_BUILD) -t dealii/dependencies:jammy \ + --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/ \ - dependencies-jammy + 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 @@ -133,14 +137,32 @@ v9.4.2-jammy: --build-arg PROCS=80 \ github docker push dealii/dealii:v9.4.2-jammy - docker tag dealii/dealii:v9.4.2-jammy dealii/dealii:latest + +v9.5.0-focal: + $(DOCKER_BUILD) -t dealii/dealii:v9.5.0-focal \ + --build-arg IMG=focal \ + --build-arg VER=v9.5.0 \ + --build-arg PROCS=12 \ + github + docker push dealii/dealii:v9.5.0-focal + +v9.5.0-jammy: + $(DOCKER_BUILD) -t dealii/dealii:v9.5.0-jammy \ + --build-arg IMG=jammy \ + --build-arg VER=v9.5.0 \ + --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 -all: dependencies-focal v9.4.2-focal dependencies-jammy v9.4.2-jammy +all: dependencies-focal v9.5.0-focal dependencies-jammy v9.5.0-jammy .PHONY: all \ v9.1.1-bionic v9.2.0-bionic \ v9.2.0-focal v9.3.0-focal v9.4.0-focal v9.4.1-focal v9.4.2-focal \ + v9.5.0-focal \ v9.4.0-jammy v9.4.1-jammy v9.4.2-jammy \ + v9.5.0-jammy \ dependencies-focal-v9.2.0 dependencies-focal-v9.3.0 dependencies-focal \ dependencies-jammy diff --git a/dependencies-focal/Dockerfile b/dependencies-focal/Dockerfile deleted file mode 100644 index 72e6a97..0000000 --- a/dependencies-focal/Dockerfile +++ /dev/null @@ -1,122 +0,0 @@ -FROM ubuntu:focal - -LABEL maintainer="luca.heltai@gmail.com" - -ARG VERSION=9.4.0-1ubuntu2~bpo20.04.1~ppa1 -ARG REPO=ppa:ginggs/deal.ii-9.4.0-backports -ARG CLANG_VERSION=11 -ARG CLANG_REPO=https://github.com/dealii/dealii/releases/download/v9.3.0/ - -USER root -ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install -y software-properties-common \ - && add-apt-repository $REPO \ - && apt-get update && apt-get install -y \ - git \ - libboost-log1.71-dev \ - libboost-python-dev \ - libcgal-dev \ - libdeal.ii-dev=$VERSION \ - libflint-dev \ - libgmp-dev \ - libgtest-dev \ - libmpc-dev \ - llvm \ - locales \ - ninja-build \ - numdiff \ - python-is-python3 \ - python3-dev \ - python3-distutils \ - python3-matplotlib \ - python3-pybind11 \ - python3-scipy\ - ssh \ - sudo \ - wget \ - && apt-get remove -y libdeal.ii-dev=$VERSION libcgal-dev \ - && apt-get clean \ - && 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 - -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/src && \ - wget https://github.com/symengine/symengine/releases/download/v0.10.1/symengine-0.10.1.tar.gz && \ - tar xvfz symengine-0.10.1.tar.gz && rm symengine-0.10.1.tar.gz &&\ - cd symengine-0.10.1 && mkdir build && cd build && \ - cmake \ - -DBUILD_BENCHMARKS=off \ - -DBUILD_SHARED_LIBS=on \ - -DBUILD_TESTS=off \ - -DINTEGER_CLASS=flint \ - -DWITH_BOOST=on \ - -DWITH_GMP=on \ - -DWITH_LLVM=on \ - -DWITH_MPC=on \ - -DWITH_MPFR=on \ - -DWITH_SYMENGINE_THREAD_SAFE=on \ - -GNinja .. && \ - ninja && ninja install && \ - cd .. && rm -rf build - -# CGAL -RUN cd /usr/src && \ - wget https://github.com/CGAL/cgal/releases/download/v5.5.2/CGAL-5.5.2.tar.xz && \ - tar xvf CGAL-5.5.2.tar.xz && \ - rm -rf CGAL-5.5.2.tar.xz && \ - cd CGAL-5.5.2/ && \ - mkdir build && cd build && \ - cmake -GNinja .. -DCMAKE_INSTALL_PREFIX=/usr/ && \ - ninja install && cd ../ && rm -rf build - -# VTK -RUN cd /usr/src && \ - wget https://gitlab.kitware.com/vtk/vtk/-/archive/v9.1.0/vtk-v9.1.0.tar.gz && \ - tar xvf vtk-v9.1.0.tar.gz && \ - rm -rf vtk-v9.1.0.tar.gz && \ - cd vtk-v9.1.0/ && \ - mkdir build && cd build && \ - cmake -GNinja .. \ - -DCMAKE_INSTALL_PREFIX=/usr/ \ - -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_SHARED_LIBS=ON \ - -DBUILD_TESTING=OFF \ - -DVTK_EXTRA_COMPILER_WARNINGS=OFF \ - -DVTK_GROUP_ENABLE_Imaging=DONT_WANT \ - -DVTK_GROUP_ENABLE_MPI=DONT_WANT \ - -DVTK_GROUP_ENABLE_Qt=DONT_WANT \ - -DVTK_GROUP_ENABLE_Rendering=DONT_WANT \ - -DVTK_GROUP_ENABLE_StandAlone=WANT \ - -DVTK_GROUP_ENABLE_Views=DONT_WANT \ - -DVTK_GROUP_ENABLE_Web=DONT_WANT \ - -DVTK_USE_MPI=OFF \ - -DVTK_WRAP_JAVA=OFF \ - -DVTK_WRAP_PYTHON=OFF && \ - ninja install && cd ../ && rm -rf build - -RUN locale-gen en_US.UTF-8 -ENV LANG en_US.UTF-8 - -RUN ldconfig -ENV PYTHONPATH "/usr/local/lib/python3.8/site-packages/" - -# add and enable the default user -ARG USER=dealii -ARG UID=1000 -RUN adduser --disabled-password --gecos '' --uid $UID $USER -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" -WORKDIR $HOME diff --git a/dependencies-jammy/Dockerfile b/dependencies/Dockerfile similarity index 97% rename from dependencies-jammy/Dockerfile rename to dependencies/Dockerfile index ad21cf6..57c3b12 100644 --- a/dependencies-jammy/Dockerfile +++ b/dependencies/Dockerfile @@ -1,4 +1,6 @@ -FROM ubuntu:jammy +ARG IMG=jammy + +FROM ubuntu:$IMG LABEL maintainer="luca.heltai@gmail.com" @@ -8,10 +10,12 @@ ARG CLANG_VERSION=11 ARG CLANG_REPO=https://github.com/dealii/dealii/releases/download/v9.3.0/ USER root +ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update && apt-get install -y software-properties-common \ && add-apt-repository $REPO \ && apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install -y \ + apt-get install -y \ git \ libboost-dev \ libboost-python-dev \