Image size: 688.8 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://simulation/busyfunc:2022-04-07

Shell into the container

singularity shell library://simulation/busyfunc:2022-04-07

Run the container

singularity run library://simulation/busyfunc:2022-04-07

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/busyfunc:2022-04-07

Shell into the container

apptainer shell library://simulation/busyfunc:2022-04-07

Run the container

apptainer run library://simulation/busyfunc:2022-04-07
Bootstrap: docker
From: ubuntu:20.04

%labels
        Maintainer Jeremy Smith
        BusyFunction 1.4 & BusyFit 0.3.2

%help
        BusyFunction 1.4 & BusyFit 0.3.2

%post
        ##############################################################################
        # Setting up Environment  
        # Create Installation Directories and export paths. This is needed as part of post.
        # %environment scriptlet does not define these paths during %post, only after.
        export LC_ALL=C.UTF-8
        export DEBIAN_FRONTEND=noninteractive

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

        # Update and install utility packages
        apt-get update -y && apt-get dist-upgrade -y
        apt-get install -y \
          software-properties-common \
          apt-utils \
          build-essential \
          bzip2 \
          git \
          pkg-config \
          vim \
          wget
        
        # Install Library dependencies
        apt-get install -y \
          libgsl-dev \
          libcfitsio-dev\
          gnuplot \
          libomp-dev \
          python3-pip \
          python-is-python3

        # Install BusyFit (https://github.com/SoFiA-Admin/BusyFit/blob/master/README.md)
        mkdir -p /opt
        cd /opt
        wget https://github.com/SoFiA-Admin/BusyFit/archive/refs/tags/v0.3.2.tar.gz
        tar -zxvf v0.3.2.tar.gz
        rm v0.3.2.tar.gz
        cd BusyFit*
        chmod 764 compile.sh
        ./compile.sh
        ln -s /opt/BusyFit-0.3.2/busyfit /usr/bin/busyfit
        
        #Install BusyFuntion (https://code.google.com/archive/p/busy-function-fitting/)
        cd /opt
        wget https://github.com/RussellJurek/busy-function-fitting/raw/master/BF_dist_1.4.tar.gz
        tar -xvf BF_dist_1.4.tar.gz
        rm BF_dist_1.4.tar.gz
        sed -i 's/CFLAGS = -O2/CFLAGS = -O2 -fPIC/g' /opt/BF_dist_1_4/makefile
        cd BF_dist_1_4
        make all
        make install
        cd python
        python setup.py build
        python setup.py install
        cp /opt/BF_dist_1_4/python/libPyBFfit.* /usr/lib/
        ln -s /opt/BF_dist_1_4/bin/FitSpectrum /usr/bin/FitSpectrum
        ln -s /opt/BF_dist_1_4/bin/cFitSpectrum /usr/bin/cFitSpectrum

        # Install basic python packages
        python -m pip install matplotlib astropy scipy numpy pandas ipykernel

        # Cleanup the container
        apt-get clean
        apt-get autoclean

%runscript
	exec /usr/bin/busyfit "$@"
Download simulation-busyfunc_2022-04-07.def