Skip to content
Snippets Groups Projects
Select Git revision
  • 16f8c50e8d68a08735fdec09091a38324c6d6e93
  • dev default protected
  • new_pvl_core
  • 8.0-test
  • lts-testing
  • revert-5695-ideal_serial
  • 9.0
  • 9.0.0_RC2
  • 8.0
  • 8.0.5_LTS
  • code8.3.0
  • 9.0.0
  • 9.0.0_RC1
  • gdal_pvl
  • Kelvinrr-patch-3
  • Kelvinrr-patch-2
  • 8.3
  • pvl_core
  • 8.2
  • 8.1
  • Kelvinrr-patch-1
  • 8.0.4
  • 8.3.0
  • 8.2.0
  • 8.1.0
  • 8.0.3
  • 8.0.2
  • 8.0.1
  • 8.0.0
  • 8.1.0_RC2
  • 8.1.0_RC1
  • 8.0.0_RC2
  • 8.0.0_RC1
  • 7.2.0
  • 7.1.0
  • 7.0.0
  • 7.2.0_RC1
  • 7.1.0_RC1
  • 7.0.0_RC2
  • 7.0.0_RC1
  • 6.0.0
41 results

README.md

Blame
  • Dockerfile 11.26 KiB
    # syntax=docker/dockerfile:1
    
    FROM debian:trixie-slim AS np-tmcode-dev
    WORKDIR /root
    
    #
    #RUN rm -rf /var/lib/apt/lists/* 
    #RUN ls -l /etc/apt/sources.list.d/oneAPI.list && sleep 5s
    #RUN cat /etc/apt/sources.list.d/oneAPI.list && sleep 5s
    #RUN ls -l /usr/share/keyrings/oneapi-archive-keyring.gpg && sleep 5s
    # make sure the debian bullseye us up to date, install needed packages
    RUN apt update
    RUN DEBIAN_FRONTEND=noninteractive apt -y upgrade
    # install packages needed to build binaries
    RUN DEBIAN_FRONTEND=noninteractive apt -y install g++ gfortran gcc-offload-nvptx g++-12 gfortran-12 gcc-12-offload-nvptx g++-13 gfortran-13 gcc-13-offload-nvptx g++-14 gfortran-14 gcc-14-offload-nvptx clang libc++-dev libc++abi-dev clang-17 clang-18 clang-19 flang-17 flang-18 flang-19 libhdf5-dev make
    # install packages needed to test with Intel OneAPI compilers
    COPY --chown=root:root containers/docker/dockerstuff/intelcomps/oneapi-archive-keyring.gpg /usr/share/keyrings/
    COPY --chown=root:root containers/docker/dockerstuff/intelcomps/oneAPI.list /etc/apt/sources.list.d/
    RUN apt update
    RUN DEBIAN_FRONTEND=noninteractive apt -y install intel-oneapi-compiler-fortran intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic intel-oneapi-compiler-dpcpp-cpp
    # install lapacke and its dependencies, both standard and the version with 64 bit integers
    RUN DEBIAN_FRONTEND=noninteractive apt -y install liblapacke-dev liblapacke64-dev libopenblas-openmp-dev libopenblas64-openmp-dev
    # install MPI stack
    RUN DEBIAN_FRONTEND=noninteractive apt -y install mpi-default-dev mpi-default-bin
    #install valgrind
    RUN DEBIAN_FRONTEND=noninteractive apt -y install valgrind valgrind-mpi
    # install nvidia stuff
    COPY --chown=root:root containers/docker/dockerstuff/debian-nonfree/debian.sources /etc/apt/sources.list.d/
    RUN apt update
    RUN DEBIAN_FRONTEND=noninteractive apt -y install libquadmath0 nvidia-cuda-dev libnvjitlink12 libcublaslt12 libcudart12 libcusparse12 libcublas12
    # install magma
    COPY --chown=root:root containers/docker/dockerstuff/magma-compiled/usr/lib/lib* /usr/lib/x86_64-linux-gnu/
    COPY --chown=root:root containers/docker/dockerstuff/magma-compiled/usr/include/* /usr/include/
    COPY --chown=root:root containers/docker/dockerstuff/magma-compiled/usr/lib/pkgconfig/* /usr/lib/x86_64-linux-gnu/pkgconfig/
    # install packages needed to run python scripts for checks
    RUN DEBIAN_FRONTEND=noninteractive apt -y install python3 python-is-python3 python3-regex python3-yaml python3-matplotlib python3-numpy
    # install packages needed to run doxygen to create html docs
    RUN DEBIAN_FRONTEND=noninteractive apt -y install doxygen
    # install packages needed to run pdflatex to create pdf docs
    RUN DEBIAN_FRONTEND=noninteractive apt -y install texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-font-utils
    # clean up apt lists
    RUN rm -rf /var/lib/apt/lists/*
    
    
    # create the container on which the gitlab pipeline runs, making sure to squash
    # all layers to save space
    FROM scratch AS np-tmcode
    COPY --from=np-tmcode-dev / /
    
    
    # create the container actually containing the code
    FROM np-tmcode-dev AS np-tmcode-run-dev
    WORKDIR /root
    #  copy the parent dir to a temporary dir in the container, so we can compile everything
    ADD src /root/np-tmcode/src
    ADD doc /root/np-tmcode/doc
    ADD build /root/np-tmcode/build
    ADD test_data /root/np-tmcode/test_data
    #RUN cd np-tmcode/src && BUILDDIR=../../build BUILDDIR_NPTM=../../build/libnptm LIBNPTM=../../build/libnptm/libnptm.a USE_ILP64=1 USE_LAPACK=1 USE_MAGMA=1 USE_OPENMP=1 USE_MPI=1 CXX=mpicxx FC=gfortran make wipe && BUILDDIR=../../build BUILDDIR_NPTM=../../build/libnptm LIBNPTM=../../build/libnptm/libnptm.a USE_ILP64=1 USE_LAPACK=1 USE_MAGMA=1 USE_OPENMP=1 USE_MPI=1 CXX=mpicxx FC=gfortran make -j && mv ../build/cluster/np_cluster ../build/cluster/np_cluster_magma_mpi
    RUN cd np-tmcode/build && CXX=mpicxx FC=gfortran ./configure --enable-openmp --with-lapack --with-magma --without-cublas && make clean && make -j && mv cluster/np_cluster cluster/np_cluster_magma_mpi && mv sphere/np_sphere sphere/np_sphere_magma_mpi && mv inclusion/np_inclusion inclusion/np_inclusion_magma_mpi && mv trapping/np_trapping trapping/np_trapping_magma_mpi
    #RUN cd np-tmcode/src && BUILDDIR=../../build BUILDDIR_NPTM=../../build/libnptm LIBNPTM=../../build/libnptm/libnptm.a USE_ILP64=1 USE_LAPACK=1 USE_MAGMA=1 USE_OPENMP=1 CXX=g++ FC=gfortran make wipe && BUILDDIR=../../build BUILDDIR_NPTM=../../build/libnptm LIBNPTM=../../build/libnptm/libnptm.a USE_ILP64=1 USE_LAPACK=1 USE_MAGMA=1 USE_OPENMP=1 CXX=g++ FC=gfortran make -j && mv ../build/cluster/np_cluster ../build/cluster/np_cluster_magma_serial
    RUN cd np-tmcode/build && CXX=g++ FC=gfortran ./configure --enable-openmp --with-lapack --with-magma --without-cublas && make clean && make -j && mv cluster/np_cluster cluster/np_cluster_magma_serial && mv sphere/np_sphere sphere/np_sphere_magma_serial && mv inclusion/np_inclusion inclusion/np_inclusion_magma_serial && mv trapping/np_trapping trapping/np_trapping_magma_serial
    RUN cd np-tmcode/build && CXX=mpicxx FC=gfortran ./configure --enable-openmp --with-lapack --without-magma --with-cublas && make clean && make -j && mv cluster/np_cluster cluster/np_cluster_cublas_mpi && mv sphere/np_sphere sphere/np_sphere_cublas_mpi && mv inclusion/np_inclusion inclusion/np_inclusion_cublas_mpi && mv trapping/np_trapping trapping/np_trapping_cublas_mpi
    RUN cd np-tmcode/build && CXX=g++ FC=gfortran ./configure --enable-openmp --with-lapack --without-magma --with-cublas && make clean && make -j && mv cluster/np_cluster cluster/np_cluster_cublas_serial && mv sphere/np_sphere sphere/np_sphere_cublas_serial && mv inclusion/np_inclusion inclusion/np_inclusion_cublas_serial && mv trapping/np_trapping trapping/np_trapping_cublas_serial
    #RUN cd np-tmcode/src && BUILDDIR=../../build BUILDDIR_NPTM=../../build/libnptm LIBNPTM=../../build/libnptm/libnptm.a USE_ILP64=1 USE_LAPACK=1 USE_OPENMP=1 USE_MPI=1 CXX=mpicxx FC=gfortran make wipe && BUILDDIR=../../build BUILDDIR_NPTM=../../build/libnptm LIBNPTM=../../build/libnptm/libnptm.a USE_ILP64=1 USE_LAPACK=1 USE_OPENMP=1 USE_MPI=1 CXX=mpicxx FC=gfortran make -j && mv ../build/cluster/np_cluster ../build/cluster/np_cluster_lapack_mpi && cd ../build/cluster && ln -s np_cluster_lapack_mpi np_cluster
    RUN cd np-tmcode/build && CXX=mpicxx FC=gfortran ./configure --enable-openmp --with-lapack --without-magma --without-cublas && make clean && make -j && mv cluster/np_cluster cluster/np_cluster_lapack_mpi && mv sphere/np_sphere sphere/np_sphere_lapack_mpi && mv inclusion/np_inclusion inclusion/np_inclusion_lapack_mpi && mv trapping/np_trapping trapping/np_trapping_lapack_mpi && cd cluster && ln -s np_cluster_lapack_mpi np_cluster && cd ../sphere && ln -s np_sphere_lapack_mpi np_sphere && cd ../inclusion && ln -s np_inclusion_lapack_mpi np_inclusion && cd ../trapping && ln -s np_trapping_lapack_mpi np_trapping   
    #RUN cd np-tmcode/src && BUILDDIR=../../build BUILDDIR_NPTM=../../build/libnptm LIBNPTM=../../build/libnptm/libnptm.a USE_ILP64=1 USE_LAPACK=1 USE_OPENMP=1 CXX=g++ FC=gfortran make wipe && BUILDDIR=../../build BUILDDIR_NPTM=../../build/libnptm LIBNPTM=../../build/libnptm/libnptm.a USE_ILP64=1 USE_LAPACK=1 USE_OPENMP=1 CXX=g++ FC=gfortran make -j && mv ../build/cluster/np_cluster ../build/cluster/np_cluster_lapack_serial
    RUN cd np-tmcode/build && CXX=g++ FC=gfortran ./configure --enable-openmp --with-lapack --without-magma --without-cublas && make clean && make -j && mv cluster/np_cluster cluster/np_cluster_lapack_serial && mv sphere/np_sphere sphere/np_sphere_lapack_serial && mv inclusion/np_inclusion inclusion/np_inclusion_lapack_serial && mv trapping/np_trapping trapping/np_trapping_lapack_serial
    #RUN cd np-tmcode/src && BUILDDIR=../../build BUILDDIR_NPTM=../../build/libnptm LIBNPTM=../../build/libnptm/libnptm.a USE_ILP64=1 USE_OPENMP=1 USE_MPI=1 CXX=mpicxx FC=gfortran make wipe && BUILDDIR=../../build BUILDDIR_NPTM=../../build/libnptm LIBNPTM=../../build/libnptm/libnptm.a USE_ILP64=1 USE_OPENMP=1 USE_MPI=1 CXX=mpicxx FC=gfortran make -j && mv ../build/cluster/np_cluster ../build/cluster/np_cluster_legacy_mpi
    RUN cd np-tmcode/build && CXX=mpicxx FC=gfortran ./configure --enable-openmp --without-lapack --without-magma --without-cublas && make clean && make -j && mv cluster/np_cluster cluster/np_cluster_legacy_mpi && mv sphere/np_sphere sphere/np_sphere_legacy_mpi && mv inclusion/np_inclusion inclusion/np_inclusion_legacy_mpi && mv trapping/np_trapping trapping/np_trapping_legacy_mpi
    #RUN cd np-tmcode/src && BUILDDIR=../../build BUILDDIR_NPTM=../../build/libnptm LIBNPTM=../../build/libnptm/libnptm.a USE_ILP64=1 USE_OPENMP=1 CXX=g++ FC=gfortran make wipe && BUILDDIR=../../build BUILDDIR_NPTM=../../build/libnptm LIBNPTM=../../build/libnptm/libnptm.a USE_ILP64=1 USE_OPENMP=1 CXX=g++ FC=gfortran make -j && mv ../build/cluster/np_cluster ../build/cluster/np_cluster_legacy_serial
    RUN cd np-tmcode/build && CXX=g++ FC=gfortran ./configure --disable-openmp --without-lapack --without-magma --without-cublas && make clean && make -j && mv cluster/np_cluster cluster/np_cluster_legacy_serial && mv sphere/np_sphere sphere/np_sphere_legacy_serial && mv inclusion/np_inclusion inclusion/np_inclusion_legacy_serial && mv trapping/np_trapping trapping/np_trapping_legacy_serial
    RUN cd np-tmcode/doc/src && doxygen config.dox && cd ../build/latex && make -j
    
    
    # create the container on which the np-tmcode is installed, restarting from
    # a minimal distro and adding strictly only the needed runtime
    FROM  debian:trixie-slim AS np-tmcode-run-minimal
    WORKDIR /root
    # install the strictly needed runtime libraries needed to run the executables
    # and the python check scripts
    COPY --chown=root:root containers/docker/dockerstuff/debian-nonfree/debian.sources /etc/apt/sources.list.d/
    RUN DEBIAN_FRONTEND=noninteractive apt update
    RUN DEBIAN_FRONTEND=noninteractive apt -y upgrade
    RUN DEBIAN_FRONTEND=noninteractive apt -y install libgfortran5 libgcc-s1 libhdf5-310 libstdc++6 libssl3t64 libcurl4t64 libsz2 zlib1g libnghttp2-14 libidn2-0 librtmp1 libssh2-1t64 libpsl5t64 libgssapi-krb5-2 libldap2 libzstd1 libbrotli1 libaec0 libunistring5 libgmp10 libkrb5-3 libk5crypto3 libcom-err2 libkrb5support0 libsasl2-2 libp11-kit0 libtasn1-6 libkeyutils1 libffi8 liblapacke64 libopenblas64-0-openmp python3 python-is-python3 python3-regex python3-yaml python3-matplotlib python3-numpy hdf5-tools libquadmath0 libgcc-s1 libgomp1 libnvjitlink12 libcublaslt12 libcudart12 libcusparse12 libcublas12 mpi-default-bin
    RUN rm -rf /var/lib/apt/lists/*
    COPY --from=np-tmcode-run-dev /root /root
    COPY --from=np-tmcode-run-dev /usr/lib/x86_64-linux-gnu/libmagma.so /usr/lib/x86_64-linux-gnu/libmagma.so
    COPY --from=np-tmcode-run-dev /usr/lib/x86_64-linux-gnu/libmagma.so.2 /usr/lib/x86_64-linux-gnu/libmagma.so.2
    # remove everything which is not needed to run the codes
    RUN cd /root/np-tmcode && find build -name "*.o" -exec rm -v \{\} \; && find build -name "*.gcno" -exec rm -v \{\} \; && cd src && rm -rvf cluster libnptm trapping include sphere testing Makefile Makefile.bak make-bak make.inc README.md && cd .. && rm -rvf containers && cd doc && rm -rvf src && cd build/latex && rm -rvf *.tex *.out *.sty *.ind *.log *.toc *.ilg *.idx *.aux *.eps Makefile class*.pdf
    # move the installed software to /usr/local
    RUN mv /root/np-tmcode /usr/local
    
    
    # create the container on which the np-tmcode is installed,
    # squashing all layers from previous stage
    FROM scratch  AS np-tmcode-run
    WORKDIR /root
    
    COPY --from=np-tmcode-run-minimal / /