From 43eb1ff30d3dd7abeb1127967973aca0fca2faf8 Mon Sep 17 00:00:00 2001 From: souley Date: Wed, 21 Oct 2020 00:37:50 -0400 Subject: [PATCH] Improving the README and re-adding lofar-2.def. --- README.md | 12 ++- lofar-2.def | 255 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 266 insertions(+), 1 deletion(-) create mode 100644 lofar-2.def diff --git a/README.md b/README.md index c28822b..b0567a2 100644 --- a/README.md +++ b/README.md @@ -1 +1,11 @@ -This repo contains work related to containerising software component of PROCESS use case 2 (UC#2), essentially composed of Singularity recipe files and patches for fixing issues or adding features into those components. +# Patches and Singularity Recipe files for building the UC2 container +This repo contains work related to containerising software components of PROCESS use case 2 (UC#2), essentially composed of Singularity recipe files and patches for fixing issues or adding features into those components. + +## Patches +**remotecommand.patch** is a patch to the eponym file in the LOFAR genericpipeline.py which allows to run some tasks from the container in a distributed fashio using SSH + +## Singularity recipe files +There are three groups of recipe files: +* The first group contains **lofarbase.def**, **lofar.def**, **factor.def** and **uc2-factor.def**. In order to build the UC2 Singularity container, they need to used successuvely in this order, each step using the output of the previous step. First, **lofarbase.def** is used to generate a container image **base.sif** via the command _sudo singularity build lbase.sif lofarbase.def_. Then, **lofar.def** is used to generate a container image **lofar.sif** via the command _sudo singularity build lofar.sif lofar.def_. etc. +* The second group is composed of only **uc2.def** which performs all the work achieved by above files in one go using the _sudo singularity build uc2.sif uc2.def_. +* The last group is composed of **ddf3t.def** and **lofar-2.def**. The former uses the container image built from the latter to construct a UC2 container image with DDF as direction-dependent calibration software, instead of FACTOR. diff --git a/lofar-2.def b/lofar-2.def new file mode 100644 index 0000000..e0284c8 --- /dev/null +++ b/lofar-2.def @@ -0,0 +1,255 @@ +Bootstrap: shub +From: tikk3r/lofar-grid-hpccloud:lofarbase +# If building from a base image locally enable this instead. +#Bootstrap: localimage +#From: lofar_base.simg + + + +%environment + export PYTHONPATH= + export INSTALLDIR=/opt/lofar + . $INSTALLDIR/init.sh + ulimit -n 4096 + +%post + # General environment settings. + export J=4 + export INSTALLDIR=/opt/lofar + export PYTHON_VERSION=2.7 + + # Path to where the patch for python-casacore setup is stored. + export PYTHON_CASACORE_PATCH=$INSTALLDIR/python-casacore/python_casacore_setup_patch.patch + export PATCH_LOFAR=$INSTALLDIR/lofar/lofar.patch + + # Settings relevant to the installed software. + export AOFLAGGER_VERSION=latest + export CASACORE_VERSION=v2.4.1 + # Leave at latest, release versions crash for some reason. + export CASAREST_VERSION=latest + export DYSCO_VERSION=v1.0.1 + export LOFAR_VERSION=3_2_9 + export LOSOTO_VERSION=2.0 + export PYBDSF_VERSION=v1.8.15 + export PYTHON_CASACORE_VERSION=v2.2.1 + export WSCLEAN_VERSION=latest + export HDF5_USE_FILE_LOCKING=FALSE + + yum -y install vim + yum -y install libsigc++20-devel gtkmm30-devel + scl enable devtoolset-7 bash + export CC=`which gcc` + export CXX=`which g++` + export CXXFLAGS="-std=c++11" + export make=$INSTALLDIR/make/bin/make + + pip install xmlrunner + pip install aplpy + + mkdir -p $INSTALLDIR + + + # + # Install CASAcore + # + mkdir -p ${INSTALLDIR}/casacore/build + mkdir -p ${INSTALLDIR}/casacore/data + cd $INSTALLDIR/casacore && git clone https://github.com/casacore/casacore.git src + if [ "${CASACORE_VERSION}" != "latest" ]; then cd ${INSTALLDIR}/casacore/src && git checkout tags/${CASACORE_VERSION}; fi + cd ${INSTALLDIR}/casacore/data && wget --retry-connrefused ftp://anonymous@ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar + cd ${INSTALLDIR}/casacore/data && tar xf WSRT_Measures.ztar + export CMAKE_PREFIX_PATH=$INSTALLDIR/hdf5 + cd ${INSTALLDIR}/casacore/build && cmake -DCMAKE_INSTALL_PREFIX=${INSTALLDIR}/casacore/ -DDATA_DIR=${INSTALLDIR}/casacore/data -DWCSLIB_ROOT_DIR=/${INSTALLDIR}/wcslib/ -DCFITSIO_ROOT_DIR=${INSTALLDIR}/cfitsio/ -DBUILD_PYTHON=True -DUSE_OPENMP=True -DUSE_FFTW3=TRUE -DUSE_HDF5=True -DBLAS_blas_LIBRARY=$INSTALLDIR/openblas/lib/libopenblas.so -DBOOST_LIBRARYDIR=$INSTALLDIR/boost/lib -DBOOST_INCLUDEDIR=$INSTALLDIR/boost/include ../src/ + cd ${INSTALLDIR}/casacore/build && $make -j ${J} + cd ${INSTALLDIR}/casacore/build && $make install + + # + # install-python-casacore + # + # Finding libraries is broken, patch the setup to include the previously installed boost and casacore libraries. + export PYTHON_VERSION=2.7 + mkdir ${INSTALLDIR}/python-casacore + cd ${INSTALLDIR}/python-casacore && git clone https://github.com/casacore/python-casacore && wget https://raw.githubusercontent.com/tikk3r/lofar-grid-hpccloud/master/patches/python_casacore_setup_patch.patch + if [ "$PYTHON_CASACORE_VERSION" != "latest" ]; then cd ${INSTALLDIR}/python-casacore/python-casacore && git checkout tags/${PYTHON_CASACORE_VERSION}; fi + cd ${INSTALLDIR}/python-casacore/python-casacore && patch setup.py $PYTHON_CASACORE_PATCH && ./setup.py build_ext -I${INSTALLDIR}/wcslib/include:${INSTALLDIR}/casacore/include/:${INSTALLDIR}/cfitsio/include:${INSTALLDIR}/boost/include -L${INSTALLDIR}/wcslib/lib:${INSTALLDIR}/casacore/lib/:${INSTALLDIR}/cfitsio/lib/:${INSTALLDIR}/boost/lib:/usr/lib64/ + mkdir -p ${INSTALLDIR}/python-casacore/lib/python${PYTHON_VERSION}/site-packages/ + mkdir -p ${INSTALLDIR}/python-casacore/lib64/python${PYTHON_VERSION}/site-packages/ + export PYTHONPATH=${INSTALLDIR}/python-casacore/lib/python${PYTHON_VERSION}/site-packages:${INSTALLDIR}/python-casacore/lib64/python${PYTHON_VERSION}/site-packages:$PYTHONPATH && cd ${INSTALLDIR}/python-casacore/python-casacore && ./setup.py install --prefix=${INSTALLDIR}/python-casacore/ + + # + # Install Dysco + # + mkdir -p $INSTALLDIR/dysco/build + cd $INSTALLDIR/dysco && git clone https://github.com/aroffringa/dysco.git src + cd $INSTALLDIR/dysco/build && cmake -DCMAKE_INSTALL_PREFIX=$INSTALLDIR/dysco -DCASACORE_ROOT_DIR=$INSTALLDIR/casacore -DBoost_LIBRARY_DIR=$INSTALLDIR/boost/lib -DBoost_INCLUDE_DIR=$INSTALLDIR/boost/include -DPORTABLE=True ../src && $make -j $J && $make install + + # + # install-aoflagger + # + mkdir -p ${INSTALLDIR}/aoflagger/build + if [ "${AOFLAGGER_VERSION}" = "latest" ]; then cd ${INSTALLDIR}/aoflagger && git clone git://git.code.sf.net/p/aoflagger/code aoflagger && cd ${INSTALLDIR}/aoflagger/aoflagger; fi + if [ "${AOFLAGGER_VERSION}" != "latest" ]; then cd ${INSTALLDIR}/aoflagger && git clone git://git.code.sf.net/p/aoflagger/code aoflagger && cd ${INSTALLDIR}/aoflagger/aoflagger && git checkout tags/${AOFLAGGER_VERSION}; fi + cd ${INSTALLDIR}/aoflagger/build && cmake -DCMAKE_INSTALL_PREFIX=${INSTALLDIR}/aoflagger/ -DCASACORE_ROOT_DIR=${INSTALLDIR}/casacore -DCFITSIO_ROOT_DIR=${INSTALLDIR}/cfitsio -DBUILD_SHARED_LIBS=ON -DBOOST_INCLUDEDIR=$INSTALLDIR/boost/include -DBOOST_LIBRARYDIR=$INSTALLDIR/boost/lib -DBOOST_ROOT=$INSTALLDIR/boost/ -DBoost_INCLUDE_DIR=$INSTALLDIR/boost/include -DBoost_LIBRARY_DIR=$INSTALLDIR/boost/lib -DBLAS_atlas_LIBRARY=$INSTALLDIR/openblas/lib/libopenblas.so -DBLAS_f77blas_LIBRARY=$INSTALLDIR/openblas/lib/libopenblas.so -DBLAS_goto2_LIBRARY=$INSTALLDIR/openblas/lib/libopenblas.so -DPORTABLE=True ../aoflagger + cd ${INSTALLDIR}/aoflagger/build && $make -j ${J} + cd ${INSTALLDIR}/aoflagger/build && $make install + + # + # install-pybdsf + # + mkdir -p ${INSTALLDIR}/pybdsf + if [ "${PYBDSF_VERSION}" = "latest" ]; then cd ${INSTALLDIR}/pybdsf && git clone https://github.com/lofar-astron/pybdsf pybdsf && cd pybdsf; fi + if [ "${PYBDSF_VERSION}" != "latest" ]; then cd ${INSTALLDIR}/pybdsf && git clone https://github.com/lofar-astron/pybdsf && cd ${INSTALLDIR}/pybdsf/pybdsf && git checkout tags/${PYBDSF_VERSION}; fi + mkdir -p ${INSTALLDIR}/pybdsf/lib/python${PYTHON_VERSION}/site-packages/ && mkdir -p ${INSTALLDIR}/pybdsf/lib64/python${PYTHON_VERSION}/site-packages/ && export PYTHONPATH=${INSTALLDIR}/pybdsf/lib/python${PYTHON_VERSION}/site-packages:${INSTALLDIR}/pybdsf/lib64/python${PYTHON_VERSION}/site-packages:$PYTHONPATH && cd ${INSTALLDIR}/pybdsf/pybdsf && python setup.py install --prefix=${INSTALLDIR}/pybdsf/ + #pip install https://github.com/lofar-astron/PyBDSF/archive/v1.8.14.tar.gz + + # + # install-lofar + # + mkdir -p ${INSTALLDIR}/lofar + mkdir -p ${INSTALLDIR}/lofar/build + mkdir -p ${INSTALLDIR}/lofar/build/gnucxx11_opt + ls ${INSTALLDIR} + ls ${INSTALLDIR}/lofar + ls ${INSTALLDIR}/lofar/build/gnucxx11_opt + if [ "${LOFAR_VERSION}" = "latest" ]; then cd ${INSTALLDIR}/lofar && svn checkout https://svn.astron.nl/LOFAR/trunk src; fi + if [ "${LOFAR_VERSION}" != "latest" ]; then cd ${INSTALLDIR}/lofar && svn checkout https://svn.astron.nl/LOFAR/tags/LOFAR-Release-${LOFAR_VERSION} src; fi + cd $INSTALLDIR/lofar && svn update --depth=infinity $INSTALLDIR/lofar/src/CMake + wget https://raw.githubusercontent.com/tikk3r/lofar-grid-hpccloud/master/patches/lofar.patch + patch $INSTALLDIR/lofar/src/CMake/variants/GNUCXX11.cmake $PATCH_LOFAR + #cd ${INSTALLDIR}/lofar/build/gnucxx11_opt && cmake -DBUILD_PACKAGES=Offline -DCMAKE_INSTALL_PREFIX=${INSTALLDIR}/lofar/ -DARMADILLO_LIBRARY=$INSTALLDIR/armadillo/lib64/libarmadillo.so -DARMADILLO_INCLUDE_DIR=$INSTALLDIR/armadillo/include -DWCSLIB_ROOT_DIR=${INSTALLDIR}/wcslib/ -DCFITSIO_ROOT_DIR=${INSTALLDIR}/cfitsio/ -DCASACORE_ROOT_DIR=${INSTALLDIR}/casacore/ -DCASAREST_ROOT_DIR=${INSTALLDIR}/casarest/ -DAOFLAGGER_LIBRARY=$INSTALLDIR/aoflagger/lib/libaoflagger.so -DAOFLAGGER_LIBRARY_DIR=${INSTALLDIR}/aoflagger/lib -DAOFLAGGER_INCLUDE_DIR=$INSTALLDIR/aoflagger/include -DLOG4CPLUS_ROOT_DIR=${INSTALLDIR}/log4cplus/ -DPYTHON_BDSF=${INSTALLDIR}/pybdsf/lib/python${PYTHON_VERSION}/site-packages/ -DUSE_OPENMP=True -DBUILD_Imager=OFF -DBLAS_blas_LIBRARY=$INSTALLDIR/openblas/lib/libopenblas.so -DBLAS_f77blas_LIBRARY=$INSTALLDIR/openblas/lib/libopenblas.so -DBLAS_goto2_LIBRARY=$INSTALLDIR/openblas/lib/libopenblas.so -DBoost_LIBRARY_DIR=$INSTALLDIR/boost/lib -DBoost_INCLUDE_DIR=$INSTALLDIR/boost/include ${INSTALLDIR}/lofar/src/ + export LD_LIBRARY_PATH=$INSTALLDIR/superlu/lib64:$LD_LIBRARY_PATH + export CMAKE_PREFIX_PATH=$INSTALLDIR/aoflagger:$INSTALLDIR/armadillo:$INSTALLDIR/boost:$INSTALLDIR/casacore:$INSTALLDIR/casarest:$INSTALLDIR/cfitsio:$INSTALLDIR/dysco:$INSTALLDIR/openblas:$INSTALLDIR/superlu:$INSTALLDIR/wcslib:$INSTALLDIR/hdf5 + export LD_LIBRARY_PATH=$INSTALLDIR/aoflagger/lib:$INSTALLDIR/armadillo/lib64:$INSTALLDIR/boost/lib:$INSTALLDIR/casacore/lib:$INSTALLDIR/cfitsio/lib:$INSTALLDIR/dysco/lib:$INSTALLDIR/openblas/lib:$INSTALLDIR/superlu/lib64:$INSTALLDIR/wcslib/lib + #cd ${INSTALLDIR}/lofar/build/gnucxx11_opt && cmake -DCMAKE_PREFIX_PATH=$INSTALLDIR/aoflagger:$INSTALLDIR/armadillo:$INSTALLDIR/boost:$INSTALLDIR/casacore:$INSTALLDIR/casarest:$INSTALLDIR/cfitsio:$INSTALLDIR/dysco:$INSTALLDIR/openblas:$INSTALLDIR/superlu:$INSTALLDIR/wcslib -DBUILD_PACKAGES="DPPP DP3 StationResponse pystationresponse ParmDB pyparmdb Pipeline" -DCMAKE_INSTALL_PREFIX=$INSTALLDIR/lofar/ -DUSE_LOG4CPLUS=OFF -DUSE_OPENMP=True ${INSTALLDIR}/lofar/src/ + cd ${INSTALLDIR}/lofar/build/gnucxx11_opt && cmake -DCMAKE_PREFIX_PATH=$INSTALLDIR/aoflagger:$INSTALLDIR/armadillo:$INSTALLDIR/boost:$INSTALLDIR/casacore:$INSTALLDIR/casarest:$INSTALLDIR/cfitsio:$INSTALLDIR/dysco:$INSTALLDIR/openblas:$INSTALLDIR/superlu:$INSTALLDIR/wcslib -DBUILD_PACKAGES="DPPP DP3 StationResponse pystationresponse ParmDB pyparmdb Pipeline MS" -DCMAKE_INSTALL_PREFIX=$INSTALLDIR/lofar/ -DUSE_LOG4CPLUS=OFF -DUSE_OPENMP=True ${INSTALLDIR}/lofar/src/ + $make -j $J + $make install + + # + # Install the standalone StationResponse libraries. + # + echo Installing LOFARBeam... + mkdir -p $INSTALLDIR/LOFARBeam/build + cd $INSTALLDIR/LOFARBeam + git clone https://github.com/lofar-astron/LOFARBeam.git src + cd build && cmake -DCMAKE_INSTALL_PREFIX=$INSTALLDIR/LOFARBeam ../src && $make -j $J && $make install + + # + # Install DPPP + # + #export CMAKE_PREFIX_PATH=$INSTALLDIR/aoflagger:$INSTALLDIR/armadillo:$INSTALLDIR/boost:$INSTALLDIR/casacore:$INSTALLDIR/cfitsio:$INSTALLDIR/hdf5:$INSTALLDIR/superlu:$INSTALLDIR/lofar:$INSTALLDIR/LOFARBeam:$INSTALLDIR/hdf5 + #export LD_LIBRARY_PATH=$INSTALLDIR/hdf5/lib:$INSTALLDIR/superlu/lib64:$INSTALLDIR/LOFARBeam/lib:$LD_LIBRARY_PATH + #mkdir -p $INSTALLDIR/DPPP/build + #git clone https://github.com/lofar-astron/DP3.git $INSTALLDIR/DPPP/src + #cd $INSTALLDIR/DPPP/build + #cmake3 -DCMAKE_CXX_FLAGS="-D_GLIB_USE_CXX_ABI=1 -DBOOST_NO_CXX11_SCOPED_ENUMS" -DCMAKE_INSTALL_PREFIX:PATH=$INSTALLDIR/DPPP -DLOFAR_STATION_RESPONSE_DIR:PATH=$INSTALLDIR/LOFARBeam/include -DLOFAR_STATION_RESPONSE_LIB:FILEPATH=$INSTALLDIR/LOFARBeam/lib/libstationresponse.so ../src + #$make -j $J && $make install + + # + # install-RMextract + # + export PYTHONPATH=$INSTALLDIR/RMextract/lib64/python2.7/site-packages:$PYTHONPATH + echo ${PYTHONPATH} + mkdir ${INSTALLDIR}/RMextract + mkdir ${INSTALLDIR}/RMextract/build + mkdir ${INSTALLDIR}/RMextract/lib64 + mkdir ${INSTALLDIR}/RMextract/lib64/python2.7 + mkdir ${INSTALLDIR}/RMextract/lib64/python2.7/site-packages + cd ${INSTALLDIR}/RMextract/build && git clone https://github.com/lofar-astron/RMextract.git src && cd src && python setup.py build --add-lofar-utils && python setup.py install --add-lofar-utils --prefix=${INSTALLDIR}/RMextract + ls ${INSTALLDIR} + + # + # Install-Losoto + # + export PYTHONPATH=/opt/lofar/losoto/lib/python2.7/site-packages/:$PYTHONPATH + mkdir ${INSTALLDIR}/losoto + mkdir ${INSTALLDIR}/losoto/build + mkdir ${INSTALLDIR}/losoto/lib + mkdir ${INSTALLDIR}/losoto/lib/python2.7 + mkdir ${INSTALLDIR}/losoto/lib/python2.7/site-packages + export PYTHONPATH=$INSTALLDIR/losoto/lib/python2.7/site-packages:$PYTHONPATH + cd ${INSTALLDIR}/losoto/build && git clone https://github.com/revoltek/losoto.git src && cd src && python setup.py build && python setup.py install --prefix=${INSTALLDIR}/losoto + + # + # Install LSMTool. + # + mkdir -p $INSTALLDIR/lsmtool/lib/python2.7/site-packages + export PYTHONPATH=$INSTALLDIR/lsmtool/lib/python2.7/site-packages:$PYTHONPATH + cd $INSTALLDIR/lsmtool && git clone https://github.com/darafferty/LSMTool.git lsmtool + cd $INSTALLDIR/lsmtool/lsmtool && python setup.py install --prefix=$INSTALLDIR/lsmtool + + # + # Install-WSClean + # + export CPATH=${INSTALLDIR}/casacore/include:$INSTALLDIR/LOFARBeam/include:$CPATH + export CMAKE_PREFIX_PATH=$INSTALLDIR/armadillo:$INSTALLDIR/boost:$INSTALLDIR/casacore:$INSTALLDIR/cfitsio:$INSTALLDIR/dysco:$INSTALLDIR/idg:$INSTALLDIR/lofar:$INSTALLDIR/LOFARBeam:$INSTALLDIR/openblas:$INSTALLDIR/superlu:$INSTALLDIR/wcslib:$INSTALLDIR/hdf5:/usr/lib64 + mkdir ${INSTALLDIR}/wsclean + if [ "$WSCLEAN_VERSION" != "latest" ]; then cd ${INSTALLDIR}/wsclean && wget http://downloads.sourceforge.net/project/wsclean/wsclean-${WSCLEAN_VERSION}/wsclean-${WSCLEAN_VERSION}.tar.bz2 && tar -xjf wsclean-${WSCLEAN_VERSION}.tar.bz2 && cd wsclean-${WSCLEAN_VERSION}; fi + if [ "$WSCLEAN_VERSION" = "latest" ]; then cd ${INSTALLDIR}/wsclean && git clone git://git.code.sf.net/p/wsclean/code src && cd src/wsclean; git checkout 5b7bdce; fi + mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=$INSTALLDIR/wsclean -DPORTABLE=True -DLOFAR_STATION_RESPONSE_DIR:PATH=$INSTALLDIR/LOFARBeam/include -DLOFAR_STATION_RESPONSE_LIB:FILEPATH=$INSTALLDIR/LOFARBeam/lib/libstationresponse.so .. + $make -j ${J} + $make install + + # + # Install DS9 + # + mkdir -p $INSTALLDIR/ds9/bin + cd $INSTALLDIR/ds9 && wget http://ds9.si.edu/download/centos7/ds9.centos7.8.0.1.tar.gz + tar xf ds9*.tar.gz -C $INSTALLDIR/ds9/bin + + echo "Installation directory contents:" + ls ${INSTALLDIR} + + rm -rf ${INSTALLDIR}/lofar/src + rm -rf ${INSTALLDIR}/lofar/build/gnu_opt + rm -rf ${INSTALLDIR}/casacore/src + rm -rf ${INSTALLDIR}/casarest/src + yum -y clean all + + # + # init-lofar + # + #ln -s /opt/lofar/DPPP/bin/DPPP /opt/lofar/lofar/bin/NDPPP + echo export INSTALLDIR=$INSTALLDIR > $INSTALLDIR/init.sh + echo export HDF5_USE_FILE_LOCKING=FALSE >> $INSTALLDIR/init.sh + echo source \$INSTALLDIR/lofar/lofarinit.sh >> $INSTALLDIR/init.sh + echo export PYTHONPATH=\$INSTALLDIR/dppp:\$INSTALLDIR/lofar/lib64/python2.7/site-packages:\$INSTALLDIR/losoto/lib/python2.7/site-packages:\$INSTALLDIR/lsmtool/lib/python2.7/site-packages:\$INSTALLDIR/pybdsf/lib/python2.7/site-packages:\$INSTALLDIR/pybdsf/lib64/python2.7/site-packages:\$INSTALLDIR/python-casacore/lib/python2.7/site-packages/:\$INSTALLDIR/python-casacore/lib64/python2.7/site-packages/:\$INSTALLDIR/RMextract/lib64/python2.7/site-packages:\$INSTALLDIR/DPPP/lib64/python2.7/site-packages/:/usr/lib64/python2.7/site-packages >> $INSTALLDIR/init.sh + echo export PATH=\$INSTALLDIR/aoflagger/bin:\$PATH >> $INSTALLDIR/init.sh + echo export PATH=\$INSTALLDIR/casacore/bin:\$PATH >> $INSTALLDIR/init.sh + echo export PATH=\$INSTALLDIR/ds9/bin:\$PATH >> $INSTALLDIR/init.sh + echo export PATH=\$INSTALLDIR/DPPP/bin:\$PATH >> $INSTALLDIR/init.sh + echo export PATH=\$INSTALLDIR/dysco/bin:\$PATH >> $INSTALLDIR/init.sh + echo export PATH=\$INSTALLDIR/lofar/bin:\$PATH >> $INSTALLDIR/init.sh + echo export PATH=\$INSTALLDIR/losoto/bin:\$PATH >> $INSTALLDIR/init.sh + echo export PATH=\$INSTALLDIR/pybdsf/bin:\$PATH >> $INSTALLDIR/init.sh + echo export PATH=\$INSTALLDIR/RMextract/bin:\$PATH >> $INSTALLDIR/init.sh + echo export PATH=\$INSTALLDIR/wsclean/bin:\$PATH >> $INSTALLDIR/init.sh + echo export LD_LIBRARY_PATH=\$INSTALLDIR/aoflagger/lib:\$INSTALLDIR/armadillo/lib64:\$INSTALLDIR/boost/lib:\$INSTALLDIR/casacore/lib:\$INSTALLDIR/cfitsio/lib:\$INSTALLDIR/DPPP/lib:\$INSTALLDIR/dysco/lib:\$INSTALLDIR/hdf5/lib:\$INSTALLDIR/lofar/lib64:\$INSTALLDIR/LOFARBeam/lib:\$INSTALLDIR/openblas/lib:\$INSTALLDIR/superlu/lib64:\$INSTALLDIR/wcslib/:\$LD_LIBRARY_PATH >> $INSTALLDIR/init.sh + echo export OPENBLAS_NUM_THREADS=1 >> $INSTALLDIR/init.sh + echo export OPENBLAS_MAX_THREADS=1 >> $INSTALLDIR/init.sh + echo export OMP_NUM_THREADS=1 >> $INSTALLDIR/init.sh + echo export OMP_MAX_THREADS=1 >> $INSTALLDIR/init.sh + + # + # entrypoint + # +%runscript + . $INSTALLDIR/init.sh + ulimit -n 4096 + + +%help + This Singularity image contains an install of LOFAR ${LOFAR_VERSION}. In order to run your pipelines, you may need to know where the software is installed. The root directory is /opt/lofar, with all software installed as follows: + + * AOFlagger: $INSTALLDIR/aoflagger + * Casacore: $INSTALLDIR/casacore + * Dysco: $INSTALLDIR/dysco + * LOFAR: $INSTALLDIR/lofar + * LoSoTo: $INSTALLDIR/losoto + * PyBDSF: $INSTALLDIR/pybdsf + * RMextract: $INSTALLDIR/RMextract + + To execute a command, use + singularity exec -B + for example: + #singularity exec lofar.simg genericpipeline.py -d -c pipeline.cfg pipeline.parset