Image size: 1.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://casa/casa-stable:v5.8.0-2026-02-17

Shell into the container

singularity shell library://casa/casa-stable:v5.8.0-2026-02-17

Run the container

singularity run library://casa/casa-stable:v5.8.0-2026-02-17

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://casa/casa-stable:v5.8.0-2026-02-17

Shell into the container

apptainer shell library://casa/casa-stable:v5.8.0-2026-02-17

Run the container

apptainer run library://casa/casa-stable:v5.8.0-2026-02-17
BootStrap: debootstrap
MirrorURL: http://archive.ubuntu.com/ubuntu/
OSVersion: bionic
Include: software-properties-common

%labels
    APPLICATION_NAME Ubuntu LTS + CASA 5.8.0
    APPLICATION_URL https://casa.nrao.edu/
    OS_VERSION 18.04
    SYSTEM_NAME iLifu
    AUTHOR_NAME Walter Silima (Modified from Jeremy Smith)

%environment
    export LC_ALL=C
    export PATH=$PATH:/opt/casa-release-5.8.0-109.el7/bin

%post
    # Declare variables for downloaded applications
    export CASA_FILENAME=casa-release-5.8.0-109.el7

    apt-add-repository multiverse
    apt-add-repository restricted
    add-apt-repository -s ppa:kernsuite/kern-6
    apt-get update -y
    
    # Added rsync to the install list - it's required for the geodetic update
    apt-get install -y wget vim apt-utils git tzdata rsync
    apt-get install -y libxrandr-dev libxcursor-dev libxinerama-dev libfontconfig1-dev fontconfig libxft-dev libgl1 libsm-dev libx11-dev libxext-dev libxi-dev libxrender-dev libxml2 libxslt1.1 libapparmor1 libtcl8.6 dbus dbus-x11 libtk8.6 tk8.6-blt2.5 blt python-tk ghostscript xvfb curl
    apt-get install -y casacore-dev casacore-doc python-casacore python-pip

    mkdir -p /opt
    cd /opt
    wget -O - https://casa.nrao.edu/download/distro/casa/release/el7/${CASA_FILENAME}.tar.gz | tar xz

    # --- GEODETIC TABLE UPDATE ---
    # Running the update during build ensures the tables are baked into the image
    /opt/${CASA_FILENAME}/bin/casa-config --exec update-data

    # Update the Config file to log to memory only.
    sed -i 's/__configs.HistoryManager.hist_file.*/__configs.HistoryManager.hist_file=":memory:"/g' /opt/${CASA_FILENAME}/lib/python2.7/start_casa.py
    sed -i "68i\ \ \ \ __configs.HistoryManager.enabled=False" /opt/${CASA_FILENAME}/lib/python2.7/start_casa.py

    # Install python packages
    apt-get install -y libboost-python-dev libboost-numpy-dev python-setuptools gfortran libcfitsio-dev wcslib-dev
    pip install astropy virtualenv ipython
    pip install --upgrade numpy scikit-image
    pip install bdsf

    # Cleanup the container
    apt-get clean
    apt-get autoclean

    # Fix command prompt
    printf 'export PS1="\u@$SINGULARITY_NAME:\w$ "' > /.singularity.d/env/999-psvars.sh

%runscript
    /opt/casa-release-5.8.0-109.el7/bin/casa "$@"
Download casa-casa-stable_v5.8.0-2026-02-17.def
#!/bin/sh

    /opt/casa-release-5.8.0-109.el7/bin/casa "$@"
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow


    export LC_ALL=C
    export PATH=$PATH:/opt/casa-release-5.8.0-109.el7/bin