Transparent Singularity
Transparent Singularity is hosted at https://github.com/neurodesk/transparent-singularity/.
This project allows Singularity containers to be used transparently on HPCs, so that an application inside the container can be used without adjusting any scripts or pipelines (e.g. nipype).
Important: add bind points to .bashrc before executing this script
Section titled “Important: add bind points to .bashrc before executing this script”This script expects that you have adjusted the Singularity bindpoints in your .bashrc, e.g.:
export SINGULARITY_BINDPATH="/gpfs1/,/QRISdata,/data"This gives you a list of all tested images available in Neurodesk
Section titled “This gives you a list of all tested images available in Neurodesk”See https://github.com/neurodesk/neurocommand/blob/main/cvmfs/log.txt.
curl -s https://raw.githubusercontent.com/neurodesk/neurocommand/main/cvmfs/log.txtClone repo into a folder with the intended image name
Section titled “Clone repo into a folder with the intended image name”git clone https://github.com/neurodesk/transparent-singularity convert3d_1.0.0_20210104Install
Section titled “Install”This will create scripts for every binary in the container located in $DEPLOY_PATH inside the container. It will also create activate and deactivate scripts and module files for Lmod (https://lmod.readthedocs.io/en/latest).
cd convert3d_1.0.0_20210104./run_transparent_singularity.sh convert3d_1.0.0_20210104Options for Transparent Singularity
Section titled “Options for Transparent Singularity”--storage: this option can be used to force a download from Docker, e.g.--storage docker--container: this option can be used to explicitly define the container name to be downloaded--unpack: this will unpack the Singularity container so it can be used on systems that do not allow opening.simg/.siffiles for security reasons, e.g.--unpack true--singularity-opts: this will be passed on to the Singularity call, e.g.--singularity-opts '--bind /cvmfs'
Use in module system Lmod
Section titled “Use in module system Lmod”Add the module folder path to $MODULEPATH.
Manual activation and deactivation
Section titled “Manual activation and deactivation”In case the module system is not available, this will add the paths to your .bashrc.
Activate
Section titled “Activate”source activate_convert3d_1.0.0_20210104.shDeactivate
Section titled “Deactivate”source deactivate_convert3d_1.0.0_20210104.sif.shUninstall container and cleanup
Section titled “Uninstall container and cleanup”./ts_uninstall.sh