Image size: 1.7 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://kernsuite/kern:v8.0.0

Shell into the container

singularity shell library://kernsuite/kern:v8.0.0

Run the container

singularity run library://kernsuite/kern:v8.0.0

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://kernsuite/kern:v8.0.0

Shell into the container

apptainer shell library://kernsuite/kern:v8.0.0

Run the container

apptainer run library://kernsuite/kern:v8.0.0
Bootstrap: debootstrap
MirrorURL: http://archive.ubuntu.com/ubuntu/
OSVersion: focal
Include: 

%labels

    APPLICATION_NAME Ubuntu LTS + kernsuite 8 + PyBDSF + Montage
    OS_VERSION 20.04 

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

    AUTHOR_NAME Jeremy Smith
    AUTHOR_EMAIL jeremy@idia.ac.za

%environment

    export LC_ALL=C
    export SOFTWARE_PATH=/opt
    export PATH=$SOFTWARE_PATH/Montage/bin:$PATH
        

%post
    ##############################################################################
    # Setting up Environment  
    # 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 SOFTWARE_PATH=/opt

    # Fix command prompt in Singularity 3.5.2
    printf 'export PS1="\u@$SINGULARITY_NAME:\w$ "' > /.singularity.d/env/999-psvars.sh
    ###############################################################################
    
    # Create Installation Directories and export paths. This is needed as part of post.
    # %environment scriptlet does not define these paths during %post only after.

    apt-get update -y
    apt-get install -y software-properties-common wget vim apt-utils git build-essential bzip2 libpng-dev
    add-apt-repository -s ppa:kernsuite/kern-8
    apt-add-repository multiverse
    apt-add-repository restricted
    apt-get update -y

    apt-get install -y python3-pip python-is-python3

    apt-get install -y 21cmfast
    apt-get install -y aoflagger aoflagger-dev libaoflagger0
    apt-get install -y apsynsim
    apt-get install -y attrdict python3-attrdict
    apt-get install -y libblitz0-dev                                                                                                                                            
    apt-get install -y brats
    apt-get install -y casacore-dev casacore-doc casacore-doc casacore-tools libcasa-casa6 libcasa-casa7 libcasa-coordinates6 libcasa-coordinates7 libcasa-derivedmscal6 libcasa-derivedmscal7 libcasa-fits6 libcasa-fits7 libcasa-images6 libcasa-images7 libcasa-lattices6 libcasa-lattices7 libcasa-meas6 libcasa-meas7 libcasa-measures6 libcasa-measures7 libcasa-mirlib6 libcasa-mirlib7 libcasa-ms6 libcasa-ms7 libcasa-msfits6 libcasa-msfits7 libcasa-python3-6 libcasa-python3-7 libcasa-scimath-f6 libcasa-scimath-f7 libcasa-scimath6 libcasa-scimath7 libcasa-tables6 libcasa-tables7
    apt-get install -y casacore-data 
    apt-get install -y casalite
    apt-get install -y casarest
    apt-get install -y cubical python3-cubical
    apt-get install -y dysco dysco-dev libdyscostman2
    apt-get install -y eht-imaging python3-eht-imaging
    apt-get install -y everybeam
    apt-get install -y future-fstrings python3-future-fstrings
    #Not applicable without CUDA
    #apt-get install -y idg-dev idg-doc libidg-api0 libidg-common0 libidg-cpu0 libidg-cuda0 libidg-external0 libidg-fft0 libidg-hybrid-cuda0 libidg-util0 libidg0 python3-idg
    #Broken dependencies
    #apt-get install -y python3-katdal
    apt-get install -y python3-katpoint
    apt-get install -y katversion python3-katversion
    apt-get install -y kittens python3-astro-kittens
    apt-get install -y libelementresponse3 libstationresponse3 lofarbeam-dev python3-lofarbeam
    apt-get install -y lsmtool python3-lsmtool
    apt-get install -y makems
    apt-get install -y meqtrees python3-meqtrees-cattery
    apt-get install -y libmeqtrees-timba0 meqtrees-timba python3-meqtrees-timba
    apt-get install -y obit python3-obit
    apt-get install -y owlcat python3-owlcat
    apt-get install -y parseltongue python3-parseltongue
    apt-get install -y polygon3
    apt-get install -y purr python3-purr
    apt-get install -y python3-pyfftw python3-pyfftw-doc
    apt-get install -y pymonetdb python3-pymonetdb
    apt-get install -y python3-slalib slalib
    apt-get install -y python3-casacore
    apt-get install -y python3-pyxis pyxis
    apt-get install -y python3-scabha scabha
    apt-get install -y python3-sharedarray sharedarray
    apt-get install -y python3-astro-tigger-lsm tigger-lsm
    apt-get install -y tirific
    apt-get install -y python3-tokenize-rt tokenize-rt
    apt-get install -y python3-xmlrunner
    apt-get install -y libwsclean2 wsclean wsclean-dev

    apt-get install -y libboost-all-dev wcslib-dev libcfitsio-dev cmake
    python -m pip install ipykernel katdal

    # Installation of PyBDSF
    apt-get install -y libboost-python-dev libboost-numpy-dev python-setuptools
    python -m pip install --upgrade scikit-image
    python -m pip install --upgrade astropy scipy bdsf matplotlib katdal astroquery
    python -m pip install numpy==1.23.5
    python -m pip install bdsf

    # Montage 6.x
    cd $SOFTWARE_PATH
    wget -O - http://montage.ipac.caltech.edu/download/Montage_v6.0.tar.gz | tar zx
    cd Montage
    make

    # Clean-up
    apt-get clean
    apt-get autoclean

%runscript
if [ $# -eq 0 ]; then
    echo "The following Python modules are installed in this image:"
    python -m pip freeze
    echo "Example usage: singularity.simg [command] [args] [options]"
else
        exec "$@"
fi
Download kernsuite-kern_v8.0.0.def
#!/bin/sh

if [ $# -eq 0 ]; then
    echo "The following Python modules are installed in this image:"
    python -m pip freeze
    echo "Example usage: singularity.simg [command] [args] [options]"
else
        exec "$@"
fi
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow



    export LC_ALL=C
    export SOFTWARE_PATH=/opt
    export PATH=$SOFTWARE_PATH/Montage/bin:$PATH