Bootstrap: docker
From: ubuntu:18.04 # Ubuntu 20 funktioniert nich

%post

    export LANG=C.UTF-8
    export LC_ALL=C.UTF-8

    ## for apt to be noninteractive
    export DEBIAN_FRONTEND=noninteractive
    export DEBCONF_NONINTERACTIVE_SEEN=true

    # INSTALL C dependencies (mostly for muFFT) and python3 # Execute the code under the root permission # You need to wait patiently for a long time
    apt-get -qq update && apt-get -y -qq install \
    clang \
    cmake \
    curl \
    wget \
    g++ \
    git \
    libboost-test-dev \
    libcurl4-openssl-dev \
    libeigen3-dev \
    libfftw3-dev \
    libgmp-dev \
    libnetcdf-dev \
    libopenblas-dev \
    m4 \
    python3-pip \
    python3-dev \
    python3-netcdf4 \
    gdb \
    git \
    && rm -rf /var/lib/apt/lists/*

    # Extended installation, more then install requires:
    wget https://raw.githubusercontent.com/ContactEngineering/SurfaceTopography/master/requirements.txt
    # I found the url to the requirements files using
    # https://api.github.com/repos/ContactEngineering/SurfaceTopography/contents/requirements.txt
    python3 -m pip install -r requirements.txt
    rm requirements.txt

    python3 -m pip install SurfaceTopography

    # ADD MORE PACKAGES HERE IF YOU WANT TO
    # or bootstrap a new image from this one.

%environment

    # Send output directly to screen
    export PYTHONUNBUFFERED=1
    # Don't load module from $HOME/.local (which is not in the container)
    export PYTHONUSERSITE=1

    export PATH=/usr/local/bin:$PATH
    export LD_RUN_PATH=/usr/local/lib:$LD_RUN_PATH
    export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
    export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
    export MANPATH=/usr/local/share/man:$MANPATH

%runscript
    python3 "$@"
