Skip to content
Snippets Groups Projects
ntrfc_container.def 1.71 KiB
Newer Older
Bootstrap: docker
From: ubuntu:20.04

%labels
Malte Nyhuis's avatar
Malte Nyhuis committed
    Version v0.0.3

%help
    With the python system-installatioon of this container can access all the ntrfc functionality
    The container can render images.

    Example cases will follow

%environment
    export LIBGL_ALWAYS_INDIRECT=0


%post

  CURDIR=$(pwd)

    # Set timezone to Etc/UTC for tzdata. See issue #4365 for more details.
    TZ=Etc/UTC && \
    ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
    echo $TZ > /etc/timezone

    apt-get update -y
    apt-get install -y tmux nano git
    apt-get install -y --no-install-recommends \
        build-essential \
        gfortran \
        libssl-dev \
        zlib1g-dev \
        libbz2-dev \
        libreadline-dev \
        libsqlite3-dev \
        wget \
        curl \
        llvm \
        libncurses5-dev \
        xz-utils \
        tk-dev \
        libxml2-dev \
        libxmlsec1-dev \
        libffi-dev \
        liblzma-dev \
        liblapack-dev \
        libopenblas-dev \
        libhdf5-dev \
        libgl1-mesa-glx xvfb \
        gcc \
Malte Nyhuis's avatar
Malte Nyhuis committed
        libglu1-mesa \
        libxcursor1 \
        libxinerama1\


    export PYENV_ROOT=/opt/pyenv
    export PATH="/opt/pyenv/bin:$PATH"
Malte Nyhuis's avatar
Malte Nyhuis committed
    wget -O- https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
    pyenv install 3.10.8
    echo 'export PATH=/opt/pyenv/versions/3.10.8/bin/:$PATH' >> $SINGULARITY_ENVIRONMENT
    export PATH=/opt/pyenv/versions/3.10.8/bin/:$PATH

    apt install python3-wheel -y
Malte Nyhuis's avatar
Malte Nyhuis committed

    git clone https://gitlab.uni-hannover.de/tfd_public/tools/NTRfC.git /opt/ntrfc
Malte Nyhuis's avatar
Malte Nyhuis committed
    cd /opt/ntrfc
    pip install .
    pip install -r requirements_dev.txt

    # clean the build
    apt-get clean
Malte Nyhuis's avatar
Malte Nyhuis committed

#%test
many's avatar
many committed
    cd /opt/ntrfc
    pytest .