diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index c22c1c8..3a83986 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -36,7 +36,6 @@ jobs: context: . pull: true load: true - build-args: BASE=${{ matrix.base }} tags: ${{ matrix.tags }} - name: Test image @@ -49,5 +48,5 @@ jobs: context: . pull: true push: true - build-args: BASE=${{ matrix.base }} tags: ${{ matrix.tags }} + build-args: ${{ matrix.build-args }} diff --git a/Dockerfile b/Dockerfile index 24b3bec..071537c 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE=focal +ARG BASE=jammy FROM ubuntu:${BASE} @@ -14,54 +14,32 @@ SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"] USER root -ENV DEFAULT_USER="runner" -ENV DEFAULT_HOME="/home/${DEFAULT_USER}" - -ENV RUNNER_DIR="${DEFAULT_HOME}/actions-runner" -ENV RUNNER_WORK_DIR="${DEFAULT_HOME}/_work" - -ENV MODULES_DIR="${DEFAULT_HOME}/modules" +ENV DEFAULT_USER="runner" \ + DEFAULT_HOME="/home/runner" \ + RUNNER_DIR="/home/runner/actions-runner" \ + RUNNER_WORK_DIR="/home/runner/_work" \ + MODULES_DIR="/home/runner/modules" COPY scripts/ /usr/local/bin/ RUN useradd -r -m -d ${DEFAULT_HOME} -s /bin/bash ${DEFAULT_USER} && \ - export DEBIAN_FRONTEND=noninteractive && \ - apt-get update && \ - apt-get install -y --no-install-recommends \ - apt-utils \ - apt-transport-https \ - ca-certificates \ - gnupg \ - openssl \ - wget \ - curl \ - rsync \ - jq \ - nano \ - vim && \ - . /etc/os-release && \ - os_num="$(echo ${VERSION_ID} | sed 's/\.//')" && \ - setup_ubuntu${os_num}.sh && \ + os_id="$(. /etc/os-release && echo ${VERSION_ID} | sed 's/\.//')" && \ + setup_ubuntu${os_id}.sh && \ runner_install.sh --install_dir="/tmp/tmp-runner" && \ /tmp/tmp-runner/bin/installdependencies.sh && \ - mkdir -p ${MODULES_DIR}/src && \ - mkdir -p ${MODULES_DIR}/opt && \ - mkdir -p ${MODULES_DIR}/modulefiles && \ - echo "module use ${MODULES_DIR}/modulefiles" >> ${DEFAULT_HOME}/.bashrc && \ - chown -R ${DEFAULT_USER}:${DEFAULT_USER} ${MODULES_DIR} && \ apt-get -y clean && \ rm -rf /var/cache/apt && \ rm -rf /var/lib/apt/lists/* && \ rm -rf /var/tmp/* && \ rm -rf /tmp/* -ENV TEXTTEST_HOME="/usr/local/bin/texttest" - USER ${DEFAULT_USER}:${DEFAULT_USER} WORKDIR ${DEFAULT_HOME} RUN source /etc/profile.d/modules.sh && \ + mkdir -p ${MODULES_DIR}/modulefiles && \ module use ${MODULES_DIR}/modulefiles && \ + echo "module use ${MODULES_DIR}/modulefiles" >> ${DEFAULT_HOME}/.bashrc && \ install_xsd.sh \ --version=${XSD} \ --modules-dir=${MODULES_DIR} && \ diff --git a/scripts/install_petsc_hdf5.sh b/scripts/install_petsc_hdf5.sh index 3e43497..2f09b68 100755 --- a/scripts/install_petsc_hdf5.sh +++ b/scripts/install_petsc_hdf5.sh @@ -2,8 +2,8 @@ usage() { - echo 'Usage: '"$(basename $0)"' --petsc-version=version --hdf5-version=version [--mpich-version=version]' - echo ' --petsc-arch={linux-gnu|linux-gnu-opt} --modules-dir=path [--parallel=value]' + echo 'Usage: '"$(basename $0)"' --petsc-version=version --petsc-arch={linux-gnu|linux-gnu-opt}' + echo ' --hdf5-version=version --modules-dir=path [--parallel=value]' exit 1 } @@ -11,7 +11,6 @@ usage() petsc_version= petsc_arch= hdf5_version= -mpich_version= base_dir= parallel= @@ -26,9 +25,6 @@ for option; do --hdf5-version=*) hdf5_version=$(expr "x$option" : "x--hdf5-version=\(.*\)") ;; - --mpich-version=*) - mpich_version=$(expr "x$option" : "x--mpich-version=\(.*\)") - ;; --modules-dir=*) base_dir=$(expr "x$option" : "x--modules-dir=\(.*\)") ;; @@ -176,12 +172,13 @@ case ${petsc_arch} in --with-cc=gcc \ --with-cxx=g++ \ --with-fc=0 \ + --with-debugging=1 \ --COPTFLAGS=-Og \ --CXXOPTFLAGS=-Og \ - --with-x=false \ + --with-shared-libraries \ --with-ssl=false \ + --with-x=false \ --download-f2cblaslapack=1 \ - --download-mpich=${download_mpich} \ --download-hdf5=${download_hdf5} \ --download-parmetis=1 \ --download-metis=1 \ @@ -206,8 +203,15 @@ case ${petsc_arch} in --download-metis=1 \ --download-hypre=1 \ --with-shared-libraries \ - --with-debugging=0 && \ - make -j ${parallel} all + --with-ssl=false \ + --with-x=false \ + --download-f2cblaslapack=1 \ + --download-hdf5=${download_hdf5} \ + --download-hypre=${download_hypre} \ + --download-metis=1 \ + --download-parmetis=1 \ + --with-make-np=${parallel} && \ + make all ;; *) ;; diff --git a/scripts/install_vtk.sh b/scripts/install_vtk.sh index 4c40b95..8169ce2 100755 --- a/scripts/install_vtk.sh +++ b/scripts/install_vtk.sh @@ -232,11 +232,34 @@ cmake \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=${install_dir} \ -DCMAKE_INSTALL_RPATH=${install_dir}/lib/vtk-${major}.${minor} \ - -DBUILD_EXAMPLES=OFF \ -DBUILD_SHARED_LIBS=ON \ - -DBUILD_TESTING=OFF \ - -DBUILD_DOCUMENTATION=OFF \ + -DVTK_BUILD_EXAMPLES=OFF \ + -DVTK_BUILD_TESTING=OFF \ + -DVTK_BUILD_DOCUMENTATION=OFF \ + -DVTK_GROUP_ENABLE_MPI=YES \ + -DVTK_USE_MPI=YES \ -DVTK_INSTALL_NO_DOCUMENTATION=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_doubleconversion=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_eigen=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_expat=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_fmt=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_freetype=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_glew=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_jpeg=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_jsoncpp=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_libproj=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_libxml2=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_lz4=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_lzma=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_netcdf=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_ogg=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_png=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_sqlite=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_theora=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_tiff=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_utf8=ON \ + -DVTK_MODULE_USE_EXTERNAL_VTK_zlib=ON \ ${src_dir} && \ make -j ${parallel} && \ make install diff --git a/scripts/setup_ubuntu1804.sh b/scripts/setup_ubuntu1804.sh index c0d71e9..b61f9b5 100755 --- a/scripts/setup_ubuntu1804.sh +++ b/scripts/setup_ubuntu1804.sh @@ -1,58 +1,143 @@ #!/bin/sh +# Package: chaste-dependencies +# Version: 2018.04.18 +# Depends: cmake | scons, g++, libopenmpi-dev, petsc-dev, libhdf5-openmpi-dev, +# xsdcxx, libboost-serialization-dev, libboost-filesystem-dev, +# libboost-program-options-dev, libparmetis-dev, libmetis-dev, +# libxerces-c-dev, libsundials-dev | libsundials-serial-dev, +# libvtk7-dev | libvtk6-dev | libvtk5-dev, python-lxml, python-amara, +# python-rdflib, libproj-dev +# Recommends: git, valgrind, libpetsc3.7.7-dbg | libpetsc3.7.6-dbg | +# libpetsc3.6.4-dbg | libpetsc3.6.2-dbg | libpetsc3.4.2-dbg, +# libfltk1.1, hdf5-tools, cmake-curses-gui +# Suggests: libgoogle-perftools-dev, doxygen, graphviz, eclipse-cdt, +# eclipse-egit, libsvn-java, subversion, git-svn, gnuplot, paraview +# APT-Sources: https://chaste.github.io/ubuntu bionic/ Packages + +# https://chaste.github.io/docs/installguides/ubuntu-package/ + export DEBIAN_FRONTEND=noninteractive +# General dependencies apt-get update && \ apt-get install -y --no-install-recommends \ - apt-utils \ apt-transport-https \ + apt-utils \ ca-certificates \ + curl \ + environment-modules \ gnupg \ + jq \ + openssl \ + rsync \ + tcl \ wget -apt-get update && \ +# Chaste dependencies apt-get install -y --no-install-recommends \ + build-essential \ cmake \ - cmake-curses-gui \ doxygen \ - environment-modules \ - g++ \ git \ - gnuplot \ - graphviz \ - hdf5-tools \ lcov \ - libboost-serialization-dev \ - libboost-filesystem-dev \ - libboost-program-options-dev \ - libhdf5-openmpi-dev \ - libmetis-dev \ - libopenmpi-dev \ - libparmetis-dev \ - libpetsc3.7.7-dbg \ - libsundials-dev \ - libvtk9.1 \ - libvtk9-dev \ - libxerces-c-dev \ - mencoder \ - petsc-dev \ + libmpich12 \ + libmpich-dev \ + python2.7 \ python3 \ python3-dev \ python3-pip \ python3-venv \ - python2.7 \ - tcl \ - valgrind \ - xsdcxx + valgrind -# https://bugs.launchpad.net/ubuntu/+source/vtk7/+bug/1878103 -# https://github.com/Chaste/chaste-docker/blob/4dd5a4819716c3defa0bfb5145bfa902bf07ecf4/Dockerfile#L89 -update-alternatives --install /usr/bin/vtk vtk /usr/bin/vtk7 10 +# VTK dependencies +apt-get install -y --no-install-recommends \ + freeglut3 \ + freeglut3-dev \ + libavcodec-dev \ + libavcodec58 \ + libavformat-dev \ + libavformat58 \ + libavutil-dev \ + libavutil56 \ + libdouble-conversion-dev \ + libdouble-conversion3 \ + libeigen3-dev \ + libexpat1-dev \ + libexpat1 \ + libfmt-dev \ + libfontconfig1 \ + libfreetype6 \ + libfreetype6-dev \ + libgdal-dev \ + libgdal26 \ + libgl1-mesa-dev \ + libgl1-mesa-glx \ + libgl2ps-dev \ + libgl2ps1.4 \ + libglew-dev \ + libglew2.1 \ + libglu1-mesa \ + libglu1-mesa-dev \ + libglx0 \ + libjpeg-dev \ + libjpeg8 \ + libjsoncpp-dev \ + libjsoncpp1 \ + liblz4-1 \ + liblz4-dev \ + liblzma5 \ + libmysqlclient-dev \ + libmysqlclient21 \ + libnetcdf-c++4 \ + libnetcdf-cxx-legacy-dev \ + libnetcdf-dev \ + libnetcdf15 \ + libodbc1 \ + libogg-dev \ + libogg0 \ + libopengl0 \ + libpng-dev \ + libpng16-16 \ + libpq-dev \ + libpq5 \ + libproj-dev \ + libproj15 \ + libsqlite3-0 \ + libsqlite3-dev \ + libswscale-dev \ + libswscale5 \ + libtbb-dev \ + libtbb2 \ + libtcl8.6 \ + libtheora-dev \ + libtheora0 \ + libtiff-dev \ + libtiff5 \ + libtk8.6 \ + libutfcpp-dev \ + libx11-6 \ + libx11-dev \ + libxcursor-dev \ + libxcursor1 \ + libxft-dev \ + libxml2 \ + libxml2-dev \ + libxss-dev \ + libxt-dev \ + libxt6 \ + sqlite3 \ + tcl-dev \ + tk-dev \ + x11proto-core-dev \ + zlib1g \ + zlib1g-dev +# Set default `python` to Python 3 update-alternatives --install /usr/local/bin/python python /usr/bin/python3 10 update-alternatives --install /usr/local/bin/pip pip /usr/bin/pip3 10 +# Python 2 is needed to configure PETSc < 3.11.x update-alternatives --install /usr/local/bin/python2 python2 /usr/bin/python2.7 5 pip install --upgrade pip -pip install texttest diff --git a/scripts/setup_ubuntu2004.sh b/scripts/setup_ubuntu2004.sh index 7f67a03..66b57f5 100755 --- a/scripts/setup_ubuntu2004.sh +++ b/scripts/setup_ubuntu2004.sh @@ -1,59 +1,140 @@ #!/bin/sh +# Package: chaste-dependencies +# Version: 2020.10.05 +# Depends: cmake | scons, g++, libopenmpi-dev, petsc-dev, libhdf5-openmpi-dev, +# xsdcxx, libboost-serialization-dev, libboost-filesystem-dev, +# libboost-program-options-dev, libparmetis-dev, libmetis-dev, +# libxerces-c-dev, libsundials-dev, libvtk7-dev | libvtk6-dev, +# python3, python3-venv +# Recommends: git, valgrind, libpetsc-real3.12-dbg, libfltk1.1, +# hdf5-tools, cmake-curses-gui +# Suggests: libgoogle-perftools-dev, doxygen, graphviz, subversion, git-svn, +# gnuplot, paraview +# APT-Sources: https://chaste.github.io/ubuntu focal/ Packages + +# https://chaste.github.io/docs/installguides/ubuntu-package/ + export DEBIAN_FRONTEND=noninteractive +# General dependencies apt-get update && \ apt-get install -y --no-install-recommends \ - apt-utils \ apt-transport-https \ + apt-utils \ ca-certificates \ + curl \ + environment-modules \ gnupg \ + jq \ + openssl \ + rsync \ wget -apt-get update && \ +# Chaste dependencies apt-get install -y --no-install-recommends \ + build-essential \ cmake \ - cmake-curses-gui \ doxygen \ - environment-modules \ - g++ \ git \ - gnuplot \ - graphviz \ - hdf5-tools \ lcov \ - libboost-serialization-dev \ - libboost-filesystem-dev \ - libboost-program-options-dev \ - libhdf5-openmpi-dev \ - libmetis-dev \ - libopenmpi-dev \ - libparmetis-dev \ - libpetsc-real3.12 \ - libpetsc-real3.12-dbg \ - libpetsc-real3.12-dev \ - libsundials-dev \ - libvtk9.1 \ - libvtk9-dev \ - libxerces-c-dev \ - mencoder \ - petsc-dev \ + libmpich12 \ + libmpich-dev \ + python2.7 \ python3 \ python3-dev \ python3-pip \ python3-venv \ - python2.7 \ - valgrind \ - xsdcxx + valgrind -# https://bugs.launchpad.net/ubuntu/+source/vtk7/+bug/1878103 -# https://github.com/Chaste/chaste-docker/blob/4dd5a4819716c3defa0bfb5145bfa902bf07ecf4/Dockerfile#L89 -update-alternatives --install /usr/bin/vtk vtk /usr/bin/vtk7 10 +# VTK dependencies +apt-get install -y --no-install-recommends \ + freeglut3 \ + freeglut3-dev \ + libavcodec-dev \ + libavcodec57 \ + libavformat-dev \ + libavformat57 \ + libavutil-dev \ + libavutil55 \ + libdouble-conversion-dev \ + libdouble-conversion1 \ + libeigen3-dev \ + libexpat1-dev \ + libexpat1 \ + libfmt-dev \ + libfontconfig1 \ + libfreetype6 \ + libfreetype6-dev \ + libgdal-dev \ + libgdal20 \ + libgl1-mesa-dev \ + libgl1-mesa-glx \ + libgl2ps-dev \ + libgl2ps1.4 \ + libglew-dev \ + libglew2.0 \ + libglu1-mesa \ + libglu1-mesa-dev \ + libglx0 \ + libjpeg-dev \ + libjpeg8 \ + libjsoncpp-dev \ + libjsoncpp1 \ + liblz4-1 \ + liblz4-dev \ + liblzma5 \ + libmysqlclient-dev \ + libmysqlclient20 \ + libnetcdf-c++4 \ + libnetcdf-cxx-legacy-dev \ + libnetcdf-dev \ + libnetcdf13 \ + libodbc1 \ + libogg-dev \ + libogg0 \ + libopengl0 \ + libpng-dev \ + libpng16-16 \ + libpq-dev \ + libpq5 \ + libproj-dev \ + libproj12 \ + libsqlite3-0 \ + libsqlite3-dev \ + libswscale-dev \ + libswscale4 \ + libtbb-dev \ + libtbb2 \ + libtcl8.6 \ + libtheora-dev \ + libtheora0 \ + libtiff-dev \ + libtiff5 \ + libtk8.6 \ + libutfcpp-dev \ + libx11-6 \ + libx11-dev \ + libxcursor-dev \ + libxcursor1 \ + libxft-dev \ + libxml2 \ + libxml2-dev \ + libxss-dev \ + libxt-dev \ + libxt6 \ + sqlite3 \ + tcl-dev \ + tk-dev \ + x11proto-core-dev \ + zlib1g \ + zlib1g-dev +# Set default `python` to Python 3 update-alternatives --install /usr/local/bin/python python /usr/bin/python3 10 update-alternatives --install /usr/local/bin/pip pip /usr/bin/pip3 10 +# Python 2 is needed to configure PETSc < 3.11.x update-alternatives --install /usr/local/bin/python2 python2 /usr/bin/python2.7 5 pip install --upgrade pip -pip install texttest diff --git a/scripts/setup_ubuntu2204.sh b/scripts/setup_ubuntu2204.sh index 89fee36..5366a3d 100755 --- a/scripts/setup_ubuntu2204.sh +++ b/scripts/setup_ubuntu2204.sh @@ -1,59 +1,141 @@ #!/bin/sh +# Package: chaste-dependencies +# Version: 2022.04.11 +# Depends: cmake | scons, g++, libopenmpi-dev, petsc-dev, libhdf5-openmpi-dev, +# xsdcxx, libboost-serialization-dev, libboost-filesystem-dev, +# libboost-program-options-dev, libparmetis-dev, libmetis-dev, +# libxerces-c-dev, libsundials-dev, libvtk7-dev | libvtk6-dev, +# python3, python3-venv +# Recommends: git, valgrind, libpetsc-real3.15-dbg | libpetsc-real3.14-dbg | +# libpetsc-real3.12-dbg, libfltk1.1, hdf5-tools, cmake-curses-gui +# Suggests: libgoogle-perftools-dev, doxygen, graphviz, subversion, git-svn, +# gnuplot, paraview +# APT-Sources: https://chaste.github.io/ubuntu jammy/ Packages + +# https://chaste.github.io/docs/installguides/ubuntu-package/ + export DEBIAN_FRONTEND=noninteractive +# General dependencies apt-get update && \ apt-get install -y --no-install-recommends \ - apt-utils \ apt-transport-https \ + apt-utils \ ca-certificates \ + curl \ + environment-modules \ gnupg \ + jq \ + openssl \ + rsync \ wget -apt-get update && \ +# Chaste dependencies apt-get install -y --no-install-recommends \ + build-essential \ cmake \ - cmake-curses-gui \ doxygen \ - environment-modules \ - g++ \ git \ - gnuplot \ - graphviz \ - hdf5-tools \ lcov \ - libboost-serialization-dev \ - libboost-filesystem-dev \ - libboost-program-options-dev \ - libhdf5-openmpi-dev \ - libmetis-dev \ - libopenmpi-dev \ - libparmetis-dev \ - libpetsc-real3.15 \ - libpetsc-real3.15-dbg \ - libpetsc-real3.15-dev \ - libsundials-dev \ - libvtk9.1 \ - libvtk9-dev \ - libxerces-c-dev \ - mencoder \ - petsc-dev \ + libmpich12 \ + libmpich-dev \ + python2.7 \ python3 \ python3-dev \ python3-pip \ python3-venv \ - python2.7 \ - valgrind \ - xsdcxx + valgrind -# https://bugs.launchpad.net/ubuntu/+source/vtk7/+bug/1878103 -# https://github.com/Chaste/chaste-docker/blob/4dd5a4819716c3defa0bfb5145bfa902bf07ecf4/Dockerfile#L89 -update-alternatives --install /usr/bin/vtk vtk /usr/bin/vtk7 10 +# VTK dependencies +apt-get install -y --no-install-recommends \ + freeglut3 \ + freeglut3-dev \ + libavcodec-dev \ + libavcodec58 \ + libavformat-dev \ + libavformat58 \ + libavutil-dev \ + libavutil56 \ + libdouble-conversion-dev \ + libdouble-conversion3 \ + libeigen3-dev \ + libexpat1-dev \ + libexpat1 \ + libfmt-dev \ + libfmt8 \ + libfontconfig1 \ + libfreetype6 \ + libfreetype6-dev \ + libgdal-dev \ + libgdal30 \ + libgl1-mesa-dev \ + libgl1-mesa-glx \ + libgl2ps-dev \ + libgl2ps1.4 \ + libglew-dev \ + libglew2.2 \ + libglu1-mesa \ + libglu1-mesa-dev \ + libglx0 \ + libjpeg-dev \ + libjpeg8 \ + libjsoncpp-dev \ + libjsoncpp25 \ + liblz4-1 \ + liblz4-dev \ + liblzma5 \ + libmysqlclient-dev \ + libmysqlclient21 \ + libnetcdf-c++4 \ + libnetcdf-cxx-legacy-dev \ + libnetcdf-dev \ + libnetcdf19 \ + libodbc2 \ + libogg-dev \ + libogg0 \ + libopengl0 \ + libpng-dev \ + libpng16-16 \ + libpq-dev \ + libpq5 \ + libproj-dev \ + libproj22 \ + libsqlite3-0 \ + libsqlite3-dev \ + libswscale-dev \ + libswscale5 \ + libtbb-dev \ + libtbb12 \ + libtcl8.6 \ + libtheora-dev \ + libtheora0 \ + libtiff-dev \ + libtiff5 \ + libtk8.6 \ + libutfcpp-dev \ + libx11-6 \ + libx11-dev \ + libxcursor-dev \ + libxcursor1 \ + libxft-dev \ + libxml2 \ + libxml2-dev \ + libxss-dev \ + libxt-dev \ + libxt6 \ + sqlite3 \ + tcl-dev \ + tk-dev \ + x11proto-core-dev \ + zlib1g \ + zlib1g-dev +# Set default `python` to Python 3 update-alternatives --install /usr/local/bin/python python /usr/bin/python3 10 update-alternatives --install /usr/local/bin/pip pip /usr/bin/pip3 10 +# Python 2 is needed to configure PETSc < 3.11.x update-alternatives --install /usr/local/bin/python2 python2 /usr/bin/python2.7 5 pip install --upgrade pip -pip install texttest