wkapp/pyfat:2022-09-30
Version sha256.a3540519298b7d72129c3249576a190cf97daf6a153dd9312a1d737e6801f049
Image size: 1.0 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:2022-09-30
Shell into the container
singularity shell library://wkapp/pyfat:2022-09-30
Run the container
singularity run library://wkapp/pyfat:2022-09-30
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:2022-09-30
Shell into the container
apptainer shell library://wkapp/pyfat:2022-09-30
Run the container
apptainer run library://wkapp/pyfat:2022-09-30
This container includes SoFiA2 master, pyFAT, BBarolo, MCGSuite
Bootstrap: debootstrap
MirrorURL: http://archive.ubuntu.com/ubuntu/
OSVersion: focal
%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 20.04
SYSTEM_NAME iLifu
SYSTEM_SINGULARITY_VERSION 3.5.2
SYSTEM_URL http://www.ilifu.ac.za
AUTHOR_NAME Jeremy Smith
AUTHOR_EMAIL jeremy@idia.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"
%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://github.com/SoFiA-Admin/SoFiA-2.git
cd SoFiA-2
#git checkout tags/v2.5.0
./compile.sh -fopenmp
# Symlink to fix pyFAT call
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
pip3 install pyFAT-astro
pip3 install omegaconf==2.1.0
# Install package requirements
apt-get install -y libfftw3-dev wcslib-dev libcfitsio-dev gnuplot python3-pip qt5-default
pip3 install --upgrade pip
pip3 install astropy scipy pandas matplotlib pyBBarolo
# 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 gui
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.git
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
mkdir mods
make
ln -s /opt/MCGSuite/Programs /opt/MCGSuite/MockCubeGenerator
# 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_2022-09-30.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"