Image size: 2.8 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:2024-02-07

Shell into the container

singularity shell library://simba/simba:2024-02-07

Run the container

singularity run library://simba/simba:2024-02-07

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:2024-02-07

Shell into the container

apptainer shell library://simba/simba:2024-02-07

Run the container

apptainer run library://simba/simba:2024-02-07
bootstrap: debootstrap
MirrorURL: http://archive.ubuntu.com/ubuntu/
OSVersion: focal

%labels

        APPLICATION_NAME_BASE Ubuntu LTS + pyloser + martini
        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 PATH="$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
        ##############################################################################
        # 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.jhhgjhgiufdgddggfgfjkj
        mkdir -p /opt

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

        # Installation of initial packages
        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 python3-dev python3-pip gcc libboost-python-dev libgsl-dev python-is-python3

        # Installation of Anaconda
        cd /opt

        # Install python packages
        python3 -m pip install --upgrade pip
        pip install --upgrade numpy scipy astropy cython h5py mercurial matplotlib pandas spectral-cube six radio-beam extinction joblib scikit-learn aplpy regions yt h5json

        # Install Caesar
        cd /opt
        git clone https://github.com/dnarayanan/caesar.git
        cd caesar
        python setup.py install

        # Install pygadgetreader
        cd /opt
        git clone https://github.com/dnarayanan/pygadgetreader.git
        cd pygadgetreader
        python setup.py build
        python setup.py install

        # Install pyloser
        cd /opt
        git clone https://github.com/dfm/python-fsps.git
        cd python-fsps
        git submodule init
        git submodule update
        export SPS_HOME=/opt/python-fsps/src/fsps/libfsps
        git checkout tags/v0.4.1
        python setup.py install
        cd /opt
        git clone https://bitbucket.org/romeeld/pyloser.git
        sed -i '1 i\#!/usr/bin/python' /opt/pyloser/pyloser.py
        chmod +x /opt/pyloser/pyloser.py

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

        # install pysynch
        cd /opt
        git clone https://github.com/mhardcastle/pysynch.git
        cd pysynch
        python setup.py install

        # install analytic (no install script, just required to be on python path)
        cd /opt
        git clone https://github.com/mhardcastle/analytic.git

        # Install ipykernel
        python -m pip install ipykernel

        # Cleanup the container
        apt-get clean
        apt-get autoclean
Download simba-simba_2024-02-07.def
#!/bin/sh
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow




        export PATH="$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"