Image size: 4.6 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://simba/simba:2026-08-18

Shell into the container

singularity shell library://simba/simba:2026-08-18

Run the container

singularity run library://simba/simba:2026-08-18

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://simba/simba:2026-08-18

Shell into the container

apptainer shell library://simba/simba:2026-08-18

Run the container

apptainer run library://simba/simba:2026-08-18
bootstrap: debootstrap
MirrorURL: http://archive.ubuntu.com/ubuntu/
OSVersion: noble

%labels
    APPLICATION_NAME_BASE Ubuntu LTS + pyloser + martini + CAESAR Photometry
    OS_VERSION 24.04
    SYSTEM_NAME iLifu
    SYSTEM_SINGULARITY_VERSION 4.4.5
    SYSTEM_URL http://www.ilifu.ac.za
    AUTHOR_NAME Walter Silima
    AUTHOR_EMAIL walter@idia.ac.za

%environment
    export VIRTUAL_ENV="/opt/venv"
    export PATH="/opt/venv/bin:$PATH:/opt/pyloser:/opt/analytic"
    export SPS_HOME="/opt/python-fsps/src/fsps/libfsps"
    export LC_ALL=C.UTF-8
    export PYTHONPATH="/opt/analytic:$PYTHONPATH"

%post
    ##############################################################################
    # Environment Setup
    ##############################################################################
    mkdir -p /opt
    printf 'export PS1="\\u@$SINGULARITY_NAME:\\w$ "' > /.singularity.d/env/999-psvars.sh

    export SPS_HOME="/opt/python-fsps/src/fsps/libfsps"
    export LC_ALL=C.UTF-8

    ##############################################################################
    # System Dependencies & Compilers
    ##############################################################################
    apt-get update -y
    apt-get install -y software-properties-common
    add-apt-repository universe
    apt-get update -y
    apt-get install -y \
        wget \
        vim \
        apt-utils \
        git \
        bzip2 \
        build-essential \
        mercurial \
        gfortran \
        ninja-build \
        python3-dev \
        python3-pip \
        python3-venv \
        gcc \
        g++ \
        cmake \
        libboost-python-dev \
        libgsl-dev \
        libfftw3-dev \
        python-is-python3 \
        libopenmpi-dev

    ##############################################################################
    # Virtual Environment Setup
    ##############################################################################
    python3 -m venv /opt/venv
    . /opt/venv/bin/activate
    export PATH="/opt/venv/bin:$PATH"

    ##############################################################################
    # Python Base Tooling & Core Stack
    ##############################################################################
    pip install --upgrade pip wheel setuptools scikit-build-core pybind11 nanobind setuptools_scm meson-python ninja
    pip install "numpy<2.0.0" cython

    # Core Scientific Stack
    pip install \
        "numpy<2.0.0" \
        scipy \
        astropy \
        seaborn \
        h5py \
        matplotlib \
        pandas \
        spectral-cube \
        six \
        radio-beam \
        extinction \
        joblib \
        scikit-learn \
        aplpy \
        regions \
        yt \
        h5json \
        scikit-spatial \
        cppyy \
        synphot \
        mpi4py \
        opencv-python \
        ipykernel

    ##############################################################################
    # Install Pylians (Pylians3)
    ##############################################################################
    cd /opt
    git clone https://github.com/franciscovillaescusa/Pylians3.git
    cd Pylians3
    pip install --no-build-isolation .

    ##############################################################################
    # Install python-fsps (FSPS Fortran Backend)
    ##############################################################################
    cd /opt
    git clone --recursive https://github.com/dfm/python-fsps.git
    cd python-fsps
    git submodule sync --recursive
    git submodule update --init --recursive
    pip install --no-build-isolation .

    ##############################################################################
    # Install Caesar
    ##############################################################################
    cd /opt
    git clone https://github.com/dnarayanan/caesar.git
    cd caesar
    pip install --no-build-isolation .

    ##############################################################################
    # Install pygadgetreader
    ##############################################################################
    cd /opt
    git clone https://github.com/dnarayanan/pygadgetreader.git
    cd pygadgetreader
    pip install --no-build-isolation .

    ##############################################################################
    # Install pyloser
    ##############################################################################
    cd /opt
    git clone https://bitbucket.org/romeeld/pyloser.git
    sed -i '1 i\#!/opt/venv/bin/python' /opt/pyloser/pyloser.py
    chmod +x /opt/pyloser/pyloser.py

    ##############################################################################
    # Install martini
    ##############################################################################
    cd /opt
    git clone https://github.com/kyleaoman/martini.git
    pip install --no-build-isolation ./martini[hdf5_output,simbasource]

    ##############################################################################
    # Install pysynch
    ##############################################################################
    cd /opt
    git clone https://github.com/mhardcastle/pysynch.git
    cd pysynch
    pip install --no-build-isolation .

    ##############################################################################
    # Install analytic
    ##############################################################################
    cd /opt
    git clone https://github.com/mhardcastle/analytic.git

    ##############################################################################
    # Cleanup Container Cache
    ##############################################################################
    apt-get clean
    apt-get autoclean
    rm -rf /var/lib/apt/lists/*
Download simba-simba_2026-08-18.def
#!/bin/sh
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow


    export VIRTUAL_ENV="/opt/venv"
    export PATH="/opt/venv/bin:$PATH:/opt/pyloser:/opt/analytic"
    export SPS_HOME="/opt/python-fsps/src/fsps/libfsps"
    export LC_ALL=C.UTF-8
    export PYTHONPATH="/opt/analytic:$PYTHONPATH"