Image size: 794.2 MB

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://calibration/wsclean:v3.3-no-cuda

Shell into the container

singularity shell library://calibration/wsclean:v3.3-no-cuda

Run the container

singularity run library://calibration/wsclean:v3.3-no-cuda

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://calibration/wsclean:v3.3-no-cuda

Shell into the container

apptainer shell library://calibration/wsclean:v3.3-no-cuda

Run the container

apptainer run library://calibration/wsclean:v3.3-no-cuda
Bootstrap: debootstrap
MirrorURL: http://archive.ubuntu.com/ubuntu/
OSVersion: focal

%labels

	APPLICATION_NAME Ubuntu LTS + wsclean
	OS_VERSION 18.04
	APPLICATION_URL https://gitlab.com/aroffringa/wsclean.git

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

	AUTHOR_NAME Jeremy Smith
	AUTHOR_EMAIL jeremy@idia.ac.za

%environment

	# Set system locale
	export LC_ALL=C

	export PYTHONPATH="$PYTHONPATH:/opt/build/EveryBeam/lib/python3.8"
	export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH"

%post

	##############################################################################
	# Setting up Environment  
    	
	export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH"

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

   	# Update Ubuntu Cache and begin install
	
	apt update -y
	apt-get install -y software-properties-common
	apt-get install -y wget gcc libxml2 curl gpg-agent build-essential

	apt-get update
	apt-get install -y apt-utils apt-transport-https git vim
	apt-add-repository -s ppa:kernsuite/kern-7
	apt-add-repository multiverse
	apt-get update

	# Packages
	apt-get install -y casacore-dev libgsl-dev libhdf5-dev libfftw3-dev libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libboost-thread-dev libcfitsio-dev cmake g++ libblas-dev liblapack-dev python3 libpython3-dev python3-distutils python-is-python3

	# Install EveryBeam
	# EveryBeam dependencies https://everybeam.readthedocs.io/en/latest/build-instructions.html
	apt-get -y install wget git make cmake g++ doxygen libboost-all-dev libhdf5-dev libfftw3-dev libblas-dev liblapack-dev libgsl-dev libxml2-dev libgtkmm-3.0-dev libpython3-dev python3-distutils
	apt-get -y install casacore-dev libcfitsio-dev wcslib-dev
	apt-get install -y python3-pip
	mkdir -p /opt/build
	cd /opt/build
	pip3 install sphinx sphinx_rtd_theme breathe myst-parser
	export GIT_SSL_NO_VERIFY=1
	git clone --recursive -j4 https://git.astron.nl/RD/EveryBeam.git
	cd EveryBeam
	mkdir build && cd build
	cmake -DCMAKE_INSTALL_PREFIX=/opt/build/EveryBeam ..
	cmake -DBUILD_WITH_PYTHON=On .
	make install
	
	export IDGAPI_DIR=/usr/local/idg
	export GIT_SSL_NO_VERIFY=1
	cd /opt/build
	git clone https://gitlab.com/astron-idg/idg.git
	cd idg
	mkdir build && cd build
	cmake -DCMAKE_INSTALL_PREFIX=/usr/local/idg/ ..
	cmake . 
	make -j 4
	make install

	mkdir /include
	cd /opt/build
	git clone https://gitlab.com/aroffringa/wsclean.git
	cd wsclean
	git submodule update --init --recursive
	mkdir -p build
	cd build
	cmake -DPORTABLE=Yes -DIDGAPI_DIR=/usr/local/idg -DEveryBeam_DIR=/opt/build/EveryBeam/lib/everybeam ..
	make -j 4
	make install

	# Clean Up
	apt clean
	apt autoclean
	apt autoremove -y
	rm -rf "/.cache" "/root/.cache"
Download calibration-wsclean_v3.3-no-cuda.def
#!/bin/sh
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow



	# Set system locale
	export LC_ALL=C

	export PYTHONPATH="$PYTHONPATH:/opt/build/EveryBeam/lib/python3.8"
	export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH"