Image size: 3.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://cigale/cigale:v2025.1-2026-03-11

Shell into the container

singularity shell library://cigale/cigale:v2025.1-2026-03-11

Run the container

singularity run library://cigale/cigale:v2025.1-2026-03-11

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://cigale/cigale:v2025.1-2026-03-11

Shell into the container

apptainer shell library://cigale/cigale:v2025.1-2026-03-11

Run the container

apptainer run library://cigale/cigale:v2025.1-2026-03-11
This container includes CIGALE (v2025.1) running on Python 3.12.
It includes dependencies like astropy, numpy, matplotlib, scipy, and ipykernel.
Run CIGALE using 'pcigale'.
Bootstrap: debootstrap
MirrorURL: http://archive.ubuntu.com/ubuntu/
OSVersion: noble

%labels
        APPLICATION_NAME Ubuntu LTS + CIGALE
        OS_VERSION 24.04
        APPLICATION_URL http://cigale.lam.fr
        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
        This container includes CIGALE (v2025.1) running on Python 3.12.
        It includes dependencies like astropy, numpy, matplotlib, scipy, and ipykernel.
        Run CIGALE using 'pcigale'.

%files
        filters_to_add /opt/filters_to_add
        filter_for_sedfitting /opt/filter_for_sedfitting

%environment
        export LC_ALL=C
        # Ensure pip-installed binaries are in the PATH
        export PATH=/usr/local/bin:$PATH

%post
        mkdir -p /opt
        export DEBIAN_FRONTEND=noninteractive

        # Installation of initial packages
        apt-get update -y && apt-get dist-upgrade -y
        apt-get install -y software-properties-common
        add-apt-repository -y universe
        apt-get update -y
        # Note: python3-pip and python3-full are essential for 3.12
        apt-get install -y wget vim apt-utils git build-essential bzip2 curl pkg-config \
            python3-pip python3-setuptools python-is-python3 git-lfs

        # In Ubuntu 24.04 (Python 3.12), we must use --break-system-packages 
        # to install globally via pip inside the container.
        export PIP_FLAGS="--break-system-packages --no-cache-dir"

        # Install Dependencies
        # Numpy < 2.0 is recommended for compatibility with many astro tools
        python -m pip install $PIP_FLAGS "numpy<2.0" astropy scipy matplotlib configobj rich ipykernel

        # Install CIGALE
        cd /opt
        # Using the v2025.1 release as requested
        wget -O cigale.tar.gz https://gitlab.lam.fr/cigale/cigale/-/archive/v2025.1/cigale-v2025.1.tar.gz
        tar -xzf cigale.tar.gz
        rm cigale.tar.gz
        cd cigale-v2025.1
        python -m pip install $PIP_FLAGS .

        # Add filters
        if [ -d "/opt/filters_to_add" ]; then
            cd /opt/filters_to_add/
            # Only run if .dat files exist to avoid build errors
            ls *.dat >/dev/null 2>&1 && pcigale-filters add *.dat || echo "No .dat filters found."
        fi

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

        # Cleanup
        apt-get clean
        apt-get autoclean

%runscript
    exec python "$@"
Download cigale-cigale_v2025.1-2026-03-11.def
#!/bin/sh

    exec python "$@"
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow


        export LC_ALL=C
        # Ensure pip-installed binaries are in the PATH
        export PATH=/usr/local/bin:$PATH