The definition file Singularity.def can be used to create a COSItools singularity container.
This assumes you have installed singularity. You create the container with:
SINGULARITY_TMPDIR=`pwd`/tmp SINGULARITY_CACHEDIR=`pwd`/cache singularity build --fakeroot COSItools.sif Singularity.def
In the container, the COSItools are installed in the directory /COSI/COSItools
singularity exec COSItools.sif /bin/bash -c '. /COSI/COSItools/source.sh; mcosima -z ${MEGALIB}/resource/examples/cosima/source/CrabOnly.source'
If you get an error such as:
WARNING: 'nodev' mount option set on XYZ, it could be a source of failure during build process
then change the above with
SINGULARITY_TMPDIR=""