calibration/polkat:v0.1.2
Version sha256.a82d2a7b65cdf6f163b4f54e60c3832cd2243261ae81fedc7d2a281c1cf84f27
Image size: 3.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://calibration/polkat:v0.1.2
Shell into the container
singularity shell library://calibration/polkat:v0.1.2
Run the container
singularity run library://calibration/polkat:v0.1.2
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/polkat:v0.1.2
Shell into the container
apptainer shell library://calibration/polkat:v0.1.2
Run the container
apptainer run library://calibration/polkat:v0.1.2
Bootstrap: docker
From: ubuntu:22.04
Stage: build
%post
echo "Here we are installing software and other dependencies for the container!"
apt update -y
apt install -y software-properties-common wget rsync
apt update -y
apt upgrade -y
# add-apt-repository -s ppa:kernsuite/kern-8
apt-add-repository multiverse
apt-add-repository restricted
apt update -y
ln -fs /usr/share/zoneinfo/Canada/Mountain /etc/localtime
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
apt install -y build-essential gfortran g++ libcfitsio-dev wcslib-dev casacore-dev 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 casacore-tools python3-casacore cmake curl libcfitsio-dev libgsl-dev \
casacore-data python3-pip fuse libfuse2 python3-tk appmenu-gtk3-module montage ffmpeg
# Install python packages, specific versions that work together (bit of a mess)
python3 -m pip install --upgrade pip
python3 -m pip install numpy wheel setuptools quartical==0.2.3 breizorro owlcat scikit-ued
python3 -m pip install sharedarray astropy datetime argparse ephem pytz pypher shadems
python3 -m pip install git+https://github.com/caracal-pipeline/crystalball@9235ed1
python3 -m pip install regions
python3 -m pip install git+https://github.com/AKHughes1994/ragavi@master
python3 -m pip install --no-cache-dir git+https://github.com/ska-sa/katbeam.git
python3 -m pip install --no-cache-dir git+https://github.com/AKHughes1994/RM-Tools
python3 -m pip install --no-cache-dir git+https://github.com/caracal-pipeline/stimela.git
python3 -m pip uninstall -y dask-expr
python3 -m pip install MSUtils cult-cargo MontagePy shadems dask[dataframe]==2023.12.1 distributed==2023.12.1 dask-ms==0.2.20
# python3 -m pip install codex-africanus==0.3.7
python3 -m pip install numpy==1.26.4
# Install tricolour
git clone https://github.com/AKHughes1994/tricolour --branch prepare-0.2.0
cd tricolour
python3 setup.py install
cd ../ && rm -rf tricolour
# Install casa
casa_version='casa-6.6.3-22-py3.8.el8'
wget https://casa.nrao.edu/download/distro/casa/release/rhel/${casa_version}.tar.xz
tar -xvf ${casa_version}.tar.xz
rm ${casa_version}.tar.xz
# Update casa leap table
cd ${casa_version}/data
rsync -avz rsync://casa-rsync.nrao.edu/casa-data .
cd ../../
# Update casacore-date leap table -- required for par angle rotation/de-retotation with cubical
cd /usr/share/casacore/data
rsync -avz rsync://casa-rsync.nrao.edu/casa-data .
cd ../../../../
# Install EveryBeam
echo "Installing Everybeam"
git clone --recursive -j4 -b v0.6.1 https://git.astron.nl/RD/EveryBeam.git
cd EveryBeam
mkdir build && cd build
cmake ../
make install
cd ../../
# Install wsclean
git clone -b v3.5 https://gitlab.com/aroffringa/wsclean.git
cd wsclean
mkdir -p build
cd build
cmake ../ -DCMAKE_PREFIX_PATH="../../EveryBeam/"
make -j 4
make install
cd ../../
%environment
casa_version='casa-6.6.3-22-py3.8.el8'
export PATH=$PATH:/${casa_version}/bin
Download calibration-polkat_v0.1.2.def
#!/bin/sh
OCI_ENTRYPOINT=''
OCI_CMD='"/bin/bash"'
# When SINGULARITY_NO_EVAL set, use OCI compatible behavior that does
# not evaluate resolved CMD / ENTRYPOINT / ARGS through the shell, and
# does not modify expected quoting behavior of args.
if [ -n "$SINGULARITY_NO_EVAL" ]; then
# ENTRYPOINT only - run entrypoint plus args
if [ -z "$OCI_CMD" ] && [ -n "$OCI_ENTRYPOINT" ]; then
exec "$@"
fi
# CMD only - run CMD or override with args
if [ -n "$OCI_CMD" ] && [ -z "$OCI_ENTRYPOINT" ]; then
if [ $# -eq 0 ]; then
set -- '/bin/bash' "$@"
fi
exec "$@"
fi
# ENTRYPOINT and CMD - run ENTRYPOINT with CMD as default args
# override with user provided args
if [ $# -eq 0 ]; then
set -- '/bin/bash' "$@"
fi
exec "$@"
fi
# Standard Apptainer behavior evaluates CMD / ENTRYPOINT / ARGS
# combination through shell before exec, and requires special quoting
# due to concatenation of CMDLINE_ARGS.
CMDLINE_ARGS=""
# prepare command line arguments for evaluation
for arg in "$@"; do
CMDLINE_ARGS="${CMDLINE_ARGS} \"$arg\""
done
# ENTRYPOINT only - run entrypoint plus args
if [ -z "$OCI_CMD" ] && [ -n "$OCI_ENTRYPOINT" ]; then
if [ $# -gt 0 ]; then
SINGULARITY_OCI_RUN="${OCI_ENTRYPOINT} ${CMDLINE_ARGS}"
else
SINGULARITY_OCI_RUN="${OCI_ENTRYPOINT}"
fi
fi
# CMD only - run CMD or override with args
if [ -n "$OCI_CMD" ] && [ -z "$OCI_ENTRYPOINT" ]; then
if [ $# -gt 0 ]; then
SINGULARITY_OCI_RUN="${CMDLINE_ARGS}"
else
SINGULARITY_OCI_RUN="${OCI_CMD}"
fi
fi
# ENTRYPOINT and CMD - run ENTRYPOINT with CMD as default args
# override with user provided args
if [ $# -gt 0 ]; then
SINGULARITY_OCI_RUN="${OCI_ENTRYPOINT} ${CMDLINE_ARGS}"
else
SINGULARITY_OCI_RUN="${OCI_ENTRYPOINT} ${OCI_CMD}"
fi
# Evaluate shell expressions first and set arguments accordingly,
# then execute final command as first container process
eval "set ${SINGULARITY_OCI_RUN}"
exec "$@"
# /.singularity.d/env/10-docker2singularity.sh
#!/bin/sh
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# /.singularity.d/env/90-environment.sh
#!/bin/sh
# Copyright (c) Contributors to the Apptainer project, established as
# Apptainer a Series of LF Projects LLC.
# For website terms of use, trademark policy, privacy policy and other
# project policies see https://lfprojects.org/policies
# Copyright (c) 2018-2021, Sylabs Inc. All rights reserved.
# This software is licensed under a 3-clause BSD license. Please consult
# https://github.com/apptainer/apptainer/blob/main/LICENSE.md regarding your
# rights to use or distribute this software.
# Custom environment shell code should follow
casa_version='casa-6.6.3-22-py3.8.el8'
export PATH=$PATH:/${casa_version}/bin