Image size: 2.1 GB

For more on pulling from the registry, see the ilifu documentation.

First, once: add the registry and make it your default

singularity remote add --no-login idia-registry https://sregistry.idia.ac.za
singularity remote use idia-registry

If you added it before, as the ilifu docs describe, remote add says it already exists: just run remote use.

Log in, for a private collection

singularity remote login idia-registry

Paste a token from your token page when asked. Public collections need no login.

Pull the container

singularity pull library://vlbi/difx:v2.8.1

Shell into the container

singularity shell library://vlbi/difx:v2.8.1

Run the container

singularity run library://vlbi/difx:v2.8.1

First, once: add the registry and make it your default

apptainer remote add --no-login idia-registry https://sregistry.idia.ac.za
apptainer remote use idia-registry

If you added it before, as the ilifu docs describe, remote add says it already exists: just run remote use.

Log in, for a private collection

apptainer remote login idia-registry

Paste a token from your token page when asked. Public collections need no login.

Pull the container

apptainer pull library://vlbi/difx:v2.8.1

Shell into the container

apptainer shell library://vlbi/difx:v2.8.1

Run the container

apptainer run library://vlbi/difx:v2.8.1
DiFX installed at /opt/difx. DiFX environment variables set in the container, but otherwise you can source the environment variable file at /opt/difx/DiFX-2.8.1/setup.bash. Make sure to set the $CALC_SERVER environment variable to an appropriate value, no CalcServer is running locally.
Bootstrap: debootstrap
MirrorURL: http://archive.ubuntu.com/ubuntu/
OSVersion: focal

%labels
        APPLICATION_NAME Ubuntu LTS + DiFX
        OS_VERSION 20.04
        APPLICATION_URL https://www.atnf.csiro.au/vlbi/dokuwiki/doku.php/difx/installation

        SYSTEM_NAME iLifu
        SYSTEM_SINGULARITY_VERSION 3.9.1
        SYSTEM_URL http://www.ilifu.ac.za

        AUTHOR_NAME IDIA
        AUTHOR_EMAIL support@ilifu.ac.za

%help
        DiFX installed at /opt/difx. DiFX environment variables set in the container, but otherwise you can source the environment variable file at /opt/difx/DiFX-2.8.1/setup.bash. Make sure to set the $CALC_SERVER environment variable to an appropriate value, no CalcServer is running locally.

%environment

	export PATH=$PATH:/opt/difx/bin
        export PKG_CONFIG_PATH=/opt/difx/lib64/pkgconfig:/opt/difx/lib/pkgconfig
        export DIFX_PREFIX=/opt/difx
        export PGPLOTDIR=/usr/lib/pgplot5
        export MPICXX=/usr/bin/mpicxx
        export DIFXROOT=/opt/difx
        export DIFX_BINARY_GROUP=224.2.2.1
        export DYLD_LIBRARY_PATH=
        export USEGFORTRAN=yes
        export DIFX_MESSAGE_GROUP=224.2.2.1
        export PERL5LIB=/opt/difx/share/perl/5.30.0:/opt/difx/./lib/x86_64-linux-gnu/perl/5.30.0
        export DIFXBITS=64
        export IPPROOT=/opt/intel
        export PYTHONPATH=/opt/difx/lib64/python:/opt/difx/lib/python
        export DIFXMPIDIR=/usr
        export LD_LIBRARY_PATH=/opt/difx/lib64:/usr/lib/pgplot5:/opt/difx/lib:/.singularity.d/libs 
        export DIFX_MESSAGE_PORT=50201
        export DIFX_VERSION=DiFX-2.8.1
        export DIFX_BINARY_PORT=50202
        export XDG_RUNTIME_DIR=$HOME

%post  -c /bin/bash

        # Create Installation Directories and export paths. This is needed as part of post.
        # %environment scriptlet does not define these paths during %post, only after.
        mkdir -p /opt
        export DEBIAN_FRONTEND=noninteractive

        # Installation of initial packages
        apt-get update -y
        apt-get install -y software-properties-common
        apt-add-repository universe
        apt-add-repository multiverse
        apt-get install -y wget vim apt-utils git build-essential bzip2 python-is-python3 python3-pip

        # Install DiFX dependencies for Ubuntu 20.04
        apt-get install -y subversion build-essential python autotools-dev autoconf libtool libfftw3-dev pkg-config libexpat1-dev openmpi-bin libgsl-dev bison flex-old
        apt-get install -y pgplot5 doxygen
        #https://www.intel.com/content/www/us/en/developer/articles/tool/oneapi-standalone-components.html#ipp
        wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/616a3fba-4ab6-4317-a17b-2be4b737fc37/l_ipp_oneapi_p_2021.9.0.49454.sh
        chmod +x l_ipp_oneapi_p_2021.9.0.49454.sh
        ./l_ipp_oneapi_p_2021.9.0.49454.sh -a -s --eula accept

        # Install DiFX
        mkdir -p /opt/difx
        cd /opt/difx
        svn co https://svn.atnf.csiro.au/difx/master_tags/DiFX-2.8.1
        sed -i -e "s|export DIFXROOT=/usr/local/difx|export DIFXROOT=/opt/difx|g" /opt/difx/DiFX-2.8.1/setup.bash
        sed -i -e "s|export PGPLOTDIR=|export PGPLOTDIR=/usr/lib/pgplot5|g" /opt/difx/DiFX-2.8.1/setup.bash
        source /opt/difx/DiFX-2.8.1/setup.bash
        /opt/difx/DiFX-2.8.1/install-difx
        
        # Fix command prompt in Singularity 3+
        printf 'export PS1="\u@$SINGULARITY_NAME:\w$ "' > /.singularity.d/env/999-psvars.sh

        # Cleanup the container
        apt-get clean
        apt-get autoclean
Download vlbi-difx_v2.8.1.def
#!/bin/sh
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow



	export PATH=$PATH:/opt/difx/bin
        export PKG_CONFIG_PATH=/opt/difx/lib64/pkgconfig:/opt/difx/lib/pkgconfig
        export DIFX_PREFIX=/opt/difx
        export PGPLOTDIR=/usr/lib/pgplot5
        export MPICXX=/usr/bin/mpicxx
        export DIFXROOT=/opt/difx
        export DIFX_BINARY_GROUP=224.2.2.1
        export DYLD_LIBRARY_PATH=
        export USEGFORTRAN=yes
        export DIFX_MESSAGE_GROUP=224.2.2.1
        export PERL5LIB=/opt/difx/share/perl/5.30.0:/opt/difx/./lib/x86_64-linux-gnu/perl/5.30.0
        export DIFXBITS=64
        export IPPROOT=/opt/intel
        export PYTHONPATH=/opt/difx/lib64/python:/opt/difx/lib/python
        export DIFXMPIDIR=/usr
        export LD_LIBRARY_PATH=/opt/difx/lib64:/usr/lib/pgplot5:/opt/difx/lib:/.singularity.d/libs 
        export DIFX_MESSAGE_PORT=50201
        export DIFX_VERSION=DiFX-2.8.1
        export DIFX_BINARY_PORT=50202
        export XDG_RUNTIME_DIR=$HOME