wkapp/pyfat:v0.1.6-2025-03-14
Version sha256.1480cdcc262430c585d4dbb15b9246b9b606ba12637e91fd7462144be7f75d8b
Image size: 1.1 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://wkapp/pyfat:v0.1.6-2025-03-14
Shell into the container
singularity shell library://wkapp/pyfat:v0.1.6-2025-03-14
Run the container
singularity run library://wkapp/pyfat:v0.1.6-2025-03-14
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://wkapp/pyfat:v0.1.6-2025-03-14
Shell into the container
apptainer shell library://wkapp/pyfat:v0.1.6-2025-03-14
Run the container
apptainer run library://wkapp/pyfat:v0.1.6-2025-03-14
This container includes SoFiA2 master, pyFAT, BBarolo, MCGSuite
Bootstrap: debootstrap
MirrorURL: http://archive.ubuntu.com/ubuntu/
OSVersion: jammy
%help
This container includes SoFiA2 master, pyFAT, BBarolo, MCGSuite
%labels
APPLICATION_NAME Ubuntu LTS + SoFiA2 + SIP + ImageMagick
APPLICATION_URL https://github.com/SoFiA-Admin/SoFiA-2
OS_VERSION 22.04
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
%environment
export LC_ALL=C
export SOFIA2_PATH="/opt/SoFiA-2"
export PATH="$PATH:/opt/SoFiA-2"
export PATH="$PATH:/opt/tirific/bin"
export PATH="$PATH:/opt/Bbarolo"
export PATH="$PATH:/opt/MCGSuite"
export PATH="$PATH:/opt/MCGSuite/Programs"
%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.
# Installation of initial packages
export DEBIAN_FRONTEND=noninteractive
apt-get update -y
apt-get install -y software-properties-common
add-apt-repository -y universe
apt-get install -y wget vim apt-utils git build-essential make bzip2 gfortran xvfb ghostscript curl pkg-config python3-pip python-is-python3 libpng-dev
# Install SoFiA2
apt-get install -y gcc wcslib-dev libopenmpi-dev openmpi-bin openmpi-common
cd /opt
git clone https://gitlab.com/SoFiA-Admin/SoFiA-2.git
cd SoFiA-2
#git checkout tags/v2.5.0
./compile.sh -fopenmp
ln -s /opt/SoFiA-2/sofia /opt/SoFiA-2/sofia2
#Install pyFAT (requires SoFiA2 & tirific)
apt-get install -y libfftw3-dev libgsl-dev wcslib-dev libreadline-dev
cd /opt
git clone https://github.com/gigjozsa/tirific.git
cd tirific
git checkout no_pgp
sed -i 's|/Users/peter/Github/tirific/|/usr/include/|' /opt/tirific/settings
sed -i 's|/usr/local/include/|/usr/include/|' /opt/tirific/settings
sed -i 's|/usr/local/lib/|/usr/lib/x86_64-linux-gnu/|' /opt/tirific/settings
make
# Install python packages including PyFAT
python -m pip install --upgrade pip
cd /opt
git clone -b v0.1.8v https://github.com/PeterKamphuis/pyFAT-astro
#git clone https://github.com/PeterKamphuis/pyFAT-astro.git
cd pyFAT-astro
#git checkout pyFAT-Beta
python -m pip install .
python -m pip install omegaconf
# Install package requirements
apt-get install -y libfftw3-dev wcslib-dev libcfitsio-dev gnuplot python3-pip qtbase5-dev
python -m pip install astropy scipy pandas matplotlib pyBBarolo TRM_errors
# Install BBarolo https://github.com/editeodoro/Bbarolo
cd /usr/bin
cd $INSTALLER_PATH
git clone -b master --single-branch https://github.com/editeodoro/Bbarolo
cd Bbarolo
./configure
make
make install
make pybbinst
# Install MCGSuite https://github.com/CIRADA-Tools/MCGSuite
apt-get install -y libbz2-dev libcurl4-gnutls-dev
cd /opt
git clone https://github.com/CIRADA-Tools/MCGSuite
sed -i 's|FitsLibLoc=$(PARENT_DIR)/third_party/cfitsio-3.3x/libcfitsio.a -lcurl -lz|FitsLibLoc=/usr/lib/x86_64-linux-gnu/libcfitsio.a -lcurl -lz -pthread -lbz2 |' /opt/MCGSuite/src/makeflags
sed -i 's|$(PARENT_DIR)/third_party/fftw-3.3.8/api|/usr/include/|' /opt/MCGSuite/src/makeflags
sed -i 's|/$(PARENT_DIR)/third_party/fftw-3.3.8/.libs|/usr/lib/x86_64-linux-gnu/|' /opt/MCGSuite/src/makeflags
sed -i 's|$(FFTW_LIBS)/libfftw3.a|/usr/lib/x86_64-linux-gnu/libfftw3.a|' /opt/MCGSuite/src/makeflags
cd MCGSuite/src
make clean
make
# Fix command prompt in Singularity 3+
printf 'export PS1="\u@$SINGULARITY_NAME:\w$ "' > /.singularity.d/env/999-psvars.sh
# Cleanup the container
apt-get clean
apt-get autoclean
%runscript
exec sofia "$@"
Download wkapp-pyfat_v0.1.6-2025-03-14.def
#!/bin/sh
exec sofia "$@"
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Custom environment shell code should follow
export LC_ALL=C
export SOFIA2_PATH="/opt/SoFiA-2"
export PATH="$PATH:/opt/SoFiA-2"
export PATH="$PATH:/opt/tirific/bin"
export PATH="$PATH:/opt/Bbarolo"
export PATH="$PATH:/opt/MCGSuite"
export PATH="$PATH:/opt/MCGSuite/Programs"