Image size: 6.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://simulation/boxfit:2022-10-12

Shell into the container

singularity shell library://simulation/boxfit:2022-10-12

Run the container

singularity run library://simulation/boxfit:2022-10-12

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://simulation/boxfit:2022-10-12

Shell into the container

apptainer shell library://simulation/boxfit:2022-10-12

Run the container

apptainer run library://simulation/boxfit:2022-10-12
Bootstrap: debootstrap
MirrorURL: http://archive.ubuntu.com/ubuntu/
OSVersion: focal

%labels
        APPLICATION_NAME Ubuntu LTS + boxfit
        OS_VERSION 20.04
        APPLICATION_URL https://github.com/hveerten/boxfit

        SYSTEM_NAME iLifu
        SYSTEM_SINGULARITY_VERSION 3.5.2
        SYSTEM_URL http://www.ilifu.ac.za

        AUTHOR_NAME IDIA
        AUTHOR_EMAIL support@ilifu.ac.za

%environment

	export PATH=$PATH:/opt/boxfit/bin

%post

        # 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 DEBIAN_FRONTEND=noninteractive

        # Installation of initial packages
        apt-get update -y
        apt-get install -y software-properties-common
        apt-add-repository -y universe
        apt-get update -y
        apt-get install -y wget vim apt-utils git build-essential bzip2 curl pkg-config

        # Install boxfit
        apt-get install -y libopenmpi-dev libhdf5-dev libhdf5-openmpi-dev
	cd /opt
	git clone https://github.com/hveerten/boxfit.git
	cd boxfit/src
	cp makefile.template makefile
        sed -i 's|LDFLAGS = -L -L/usr/lib -lm -lhdf5 -lgomp|LDFLAGS = -L/usr/lib -lm -lhdf5_openmpi -lgomp|' /opt/boxfit/src/makefile
        sed -i 's|CPPFLAGS = -I/usr/include/mpi -Wall -O0 -g -fopenmp|CPPFLAGS = -I/usr/include/mpi -I/usr/include/hdf5/openmpi -Wall -O0 -g -fopenmp|' /opt/boxfit/src/makefile
	make boxfit

        # Download data files
        cd ../data
        for N in $(seq -w 00 33); do wget --no-check-certificate https://cosmo.nyu.edu/afterglowlibrary/boxfitdatav2/boxISM_$N.h5; done
        for N in $(seq -w 00 33); do wget --no-check-certificate https://cosmo.nyu.edu/afterglowlibrary/boxfitdatav2/boxboostmedwind_$N.h5; done
        for N in $(seq -w 00 22); do wget --no-check-certificate https://cosmo.nyu.edu/afterglowlibrary/boxfitdatav2/boxboostISM_$N.h5; done
        for N in $(seq -w 00 22); do wget --no-check-certificate https://cosmo.nyu.edu/afterglowlibrary/boxfitdatav2/boxboostwind_$N.h5; done

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

        # Cleanup the container
        apt-get clean
        apt-get autoclean
Download simulation-boxfit_2022-10-12.def