From f1f512deb796a718d9e1f81107ab9c6b8f2019c0 Mon Sep 17 00:00:00 2001 From: Marco Duering Date: Mon, 9 Nov 2020 16:35:05 +0100 Subject: [PATCH 1/4] singularity draft --- README.md | 2 + singularity/README.md | 57 +++++++++++ singularity/singularity-psmd.txt | 167 +++++++++++++++++++++++++++++++ 3 files changed, 226 insertions(+) create mode 100644 singularity/README.md create mode 100644 singularity/singularity-psmd.txt diff --git a/README.md b/README.md index 3cc58d8..544b149 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ BSD 3-clause. Please see the `LICENSE` file provided in this repository. ## Support +The PSMD project was initiated at the Institue for Stroke and Dementia Research (ISD), Munich, Germany, with funding support by the LMU FöFoLe program (grant 808), the Else Kröner-Fresenius-Stiftung (EKFS, grant 2014_A200), and the Vascular Dementia Research Foundation. + The ongoing development of PSMD is supported by Medical Image Analysis Center (MIAC), Basel, Switzerland. MIAC logo \ No newline at end of file diff --git a/singularity/README.md b/singularity/README.md new file mode 100644 index 0000000..4be5fcd --- /dev/null +++ b/singularity/README.md @@ -0,0 +1,57 @@ +# PSMD Singularity Conatiner + +Using containers can solve issues arising from dependencies and heterogeneous environments. + +Singularity is a well-established container solution, developed with scientific computing and deployment on HPC infrastructure (compute cluster) in mind. + +## Instructions + +### Prerequisites + +- Installation of [singularity](https://sylabs.io) version 3.6 or newer, preferably installed on Linux +- Linux is needed for building the container. A virtual machine setup is available for Windows and Mac users, please consult the [Singularity user guide](https://sylabs.io/docs/) for details. +- After building, the built container can also be executed on macOS using [Singularity Desktop](https://sylabs.io/singularity-desktop-macos/). + +### Build the container + +- Download the Singularity recipe file `singularity-psmd.txt` +- To build the container `psmd.sif` from the recipe, run + +``` +singularity build psmd.sif singularity-psmd.txt +``` + +> Please note that the container will be quite large, usually around 1.7 GB. Also note that in order to save space, some parts of the FSL installation were deleted. The container does not contain a fully functional FSL installation, but a minimal install suited for diffusion processing and PSMD calculation. Change the recipe file if you want to change this! + +### Run the container + +- In general, on a system with Singularity or Singularity Desktop, run with: + +```bash +singularity exec psmd.sif psmd.sh +``` + +- After this command, specify the options as usually for the psmd script, e.g. + +```bash +singularity exec psmd.sif psmd.sh -d data.nii.gz -b data.bvals \ + -r data.bvecs -s skeleton_mask_2019.nii.gz +``` + +- The container has access only to the current folder of your system, where you are running the command. If your data (or the skeleton) is in another folder, you need to make the folder available to the container using the bind option `-B` of singularity: + +```bash +datafolder=/path/to/data +skeletonfolder=/path/to/skeleton +singularity exec -B ${datafolder} -B ${skeletonfolder} psmd.sif psmd.sh \ + -d ${datafolder}/data.nii.gz -b ${datafolder}/data.bvals -r ${datafolder}/data.bvecs \ + -s ${skeletonfolder}/skeleton_mask_2019.nii.gz +``` + +## Acknowledgements + +The container recipe was in part generated by [Neurodocker](https://github.com/ReproNim/neurodocker). + +## License + +The container will contain an FSL installation. Please make sure to comply with the [FSL license conditions](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Licence). Especially commercial use required a paid license of FSL! \ No newline at end of file diff --git a/singularity/singularity-psmd.txt b/singularity/singularity-psmd.txt new file mode 100644 index 0000000..a83f3e2 --- /dev/null +++ b/singularity/singularity-psmd.txt @@ -0,0 +1,167 @@ +# PSMD Singularity Container Definition File +# https://www.psmd-marker.com ###### ADD UPDATED URL HERE ###### + +# Partly generated by: Neurodocker version 0.7.0 +# https://github.com/ReproNim/neurodocker + +Bootstrap: docker +From: ubuntu:bionic-20200921 + +%help +Visit the PSMD repository for help: https://github.com/miac-research/psmd + +%labels + Author Marco Duering + Maintainer MIAC AG + Recipe_version v1.0 + +%post +su - root + +# Neurodocker Environment +export ND_ENTRYPOINT="/neurodocker/startup.sh" +apt-get update -qq +apt-get install -y -q --no-install-recommends \ + apt-utils \ + bzip2 \ + ca-certificates \ + curl \ + locales \ + unzip +apt-get clean +rm -rf /var/lib/apt/lists/* +sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen +dpkg-reconfigure --frontend=noninteractive locales +update-locale LANG="en_US.UTF-8" +chmod 777 /opt && chmod a+s /opt +mkdir -p /neurodocker +if [ ! -f "$ND_ENTRYPOINT" ]; then + echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT" + echo 'set -e' >> "$ND_ENTRYPOINT" + echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT" + echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT"; +fi +chmod -R 777 /neurodocker && chmod a+s /neurodocker + +# FSL 6.0.3 +apt-get update -qq +apt-get install -y -q --no-install-recommends \ + bc \ + dc \ + file \ + libfontconfig1 \ + libfreetype6 \ + libgl1-mesa-dev \ + libgl1-mesa-dri \ + libglu1-mesa-dev \ + libgomp1 \ + libice6 \ + libopenblas-dev \ + libxcursor1 \ + libxft2 \ + libxinerama1 \ + libxrandr2 \ + libxrender1 \ + libxt6 \ + sudo \ + wget +apt-get clean +rm -rf /var/lib/apt/lists/* +echo "Downloading FSL ..." +mkdir -p /opt/fsl-6.0.3 +curl -fsSL --retry 5 https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.3-centos6_64.tar.gz \ +| tar -xz -C /opt/fsl-6.0.3 --strip-components 1 +sed -i '$isource $FSLDIR/etc/fslconf/fsl.sh' $ND_ENTRYPOINT + +# Reducing size of FSL installation by deleting some components not needed by PSMD +rm -r /opt/fsl-6.0.3/data/first/ +rm -r /opt/fsl-6.0.3/src +rm -r /opt/fsl-6.0.3/bin/probtrackx2_gpu +rm -r /opt/fsl-6.0.3/bin/mist +rm -r /opt/fsl-6.0.3/bin/melodic +rm -r /opt/fsl-6.0.3/bin/fabber_asl +rm -r /opt/fsl-6.0.3/bin/fabber_cest +rm -r /opt/fsl-6.0.3/bin/probtrackx2 +rm -r /opt/fsl-6.0.3/bin/run_mesh_utils +rm -r /opt/fsl-6.0.3/bin/fabber_dualecho +rm -r /opt/fsl-6.0.3/bin/fdt_matrix_merge +rm -r /opt/fsl-6.0.3/bin/fabber_dsc +rm -r /opt/fsl-6.0.3/bin/fabber_dce +rm -r /opt/fsl-6.0.3/bin/mvntool +rm -r /opt/fsl-6.0.3/bin/fabber +rm -r /opt/fsl-6.0.3/bin/fabber_dwi +rm -r /opt/fsl-6.0.3/bin/flameo +rm -r /opt/fsl-6.0.3/bin/fabber_t1 +rm -r /opt/fsl-6.0.3/bin/fabber_qbold +rm -r /opt/fsl-6.0.3/bin/surf_proj +rm -r /opt/fsl-6.0.3/bin/probtrackx +rm -r /opt/fsl-6.0.3/bin/surf2surf +rm -r /opt/fsl-6.0.3/bin/film_gls +rm -r /opt/fsl-6.0.3/bin/xfibres +rm -r /opt/fsl-6.0.3/bin/ttoz +rm -r /opt/fsl-6.0.3/bin/ttologp +rm -r /opt/fsl-6.0.3/bin/ftoz +rm -r /opt/fsl-6.0.3/bin/contrast_mgr +rm -r /opt/fsl-6.0.3/bin/qboot +rm -r /opt/fsl-6.0.3/bin/vecreg +rm -r /opt/fsl-6.0.3/bin/swe +rm -r /opt/fsl-6.0.3/bin/fsl_mvlm +rm -r /opt/fsl-6.0.3/bin/mm +rm -r /opt/fsl-6.0.3/bin/pvmfit + +# PSMD +apt-get update -qq +apt-get install -y -q --no-install-recommends \ + dc +apt-get clean +rm -rf /var/lib/apt/lists/* +mkdir /psmd +wget -O /psmd/psmd.sh https://raw.githubusercontent.com/miac-research/psmd/main/psmd.sh +chmod -R 777 /psmd +chmod +x /psmd/psmd.sh + +# Neurodocker Specs +echo '{ +\n "pkg_manager": "apt", +\n "instructions": [ +\n [ +\n "base", +\n "ubuntu:bionic-20200921" +\n ], +\n [ +\n "user", +\n "root" +\n ], +\n [ +\n "_header", +\n { +\n "version": "generic", +\n "method": "custom" +\n } +\n ], +\n [ +\n "fsl", +\n { +\n "version": "6.0.3" +\n } +\n ] +\n ] +\n}' > /neurodocker/neurodocker_specs.json + +%environment +export LANG="en_US.UTF-8" +export LC_ALL="en_US.UTF-8" +export ND_ENTRYPOINT="/neurodocker/startup.sh" +export FSLDIR="/opt/fsl-6.0.3" +export PATH="/opt/fsl-6.0.3/bin:/psmd:$PATH" +export FSLOUTPUTTYPE="NIFTI_GZ" +export FSLMULTIFILEQUIT="TRUE" +export FSLTCLSH="/opt/fsl-6.0.3/bin/fsltclsh" +export FSLWISH="/opt/fsl-6.0.3/bin/fslwish" +export FSLLOCKDIR="" +export FSLMACHINELIST="" +export FSLREMOTECALL="" +export FSLGECUDAQ="cuda.q" + +%runscript +/neurodocker/startup.sh "$@" From ad96fed9b084936645b56c50aeb77ee09130085a Mon Sep 17 00:00:00 2001 From: Marco Duering Date: Tue, 10 Nov 2020 13:52:53 +0100 Subject: [PATCH 2/4] singularity_init --- singularity/README.md | 34 +++++++++++++++----- singularity/singularity-psmd.txt | 55 +++++++++++++++++--------------- 2 files changed, 55 insertions(+), 34 deletions(-) diff --git a/singularity/README.md b/singularity/README.md index 4be5fcd..7adc54d 100644 --- a/singularity/README.md +++ b/singularity/README.md @@ -4,6 +4,10 @@ Using containers can solve issues arising from dependencies and heterogeneous en Singularity is a well-established container solution, developed with scientific computing and deployment on HPC infrastructure (compute cluster) in mind. +This singularity recipe installs FSL 6.0.3 and the current version of the PSMD script into a container using Ubuntu Bionic as the operating system. + +> If you want to build the container with a specific version of PSMD, please see the detailed instructions below! + ## Instructions ### Prerequisites @@ -15,13 +19,25 @@ Singularity is a well-established container solution, developed with scientific ### Build the container - Download the Singularity recipe file `singularity-psmd.txt` -- To build the container `psmd.sif` from the recipe, run +- Build the container `psmd.sif` from the recipe file (using sudo) ``` -singularity build psmd.sif singularity-psmd.txt +wget https://raw.githubusercontent.com/miac-research/psmd/main/singularity/singularity-psmd.txt +sudo singularity build psmd.sif singularity-psmd.txt ``` -> Please note that the container will be quite large, usually around 1.7 GB. Also note that in order to save space, some parts of the FSL installation were deleted. The container does not contain a fully functional FSL installation, but a minimal install suited for diffusion processing and PSMD calculation. Change the recipe file if you want to change this! +> Please note that the container will be very large, usually around 2.5 GB. Also note that in order to save space, some parts of the FSL installation are deleted. The container does not contain a fully functional FSL installation, but a minimal install suited for diffusion processing and PSMD calculation. You can modify the recipe file in order to retain a full FSL install. + +### Using a specific version of PSMD in the container + +By default, the container will use the latest version of the psmd script from the repository. If you want to run a specific version, substitute the URL for the wget download with one of the follwoing: + +| version | URL | +| --- | --- | +| 1.0 | https://raw.githubusercontent.com/miac-research/psmd/8f6b1495a65972111ec099b7f304d9f3954bd983/psmd.sh | +| 1.5.1 | https://raw.githubusercontent.com/miac-research/psmd/d0de74fe0b190d04588b934981c7464334f83b9f/psmd.sh | +| 1.7 | tbd | + ### Run the container @@ -38,13 +54,15 @@ singularity exec psmd.sif psmd.sh -d data.nii.gz -b data.bvals \ -r data.bvecs -s skeleton_mask_2019.nii.gz ``` -- The container has access only to the current folder of your system, where you are running the command. If your data (or the skeleton) is in another folder, you need to make the folder available to the container using the bind option `-B` of singularity: +- The container has access only to the current folder of your system, where you are running the command. If your data (or the skeleton) is in another folder, you need to make the folder available to the container using the bind option `-B` of singularity. + +- The following example works if subjectA (from the example subjects provided in this repository) is located at `/home/user/subjectA` and the skeleton mask is located at `/home/user`. ```bash -datafolder=/path/to/data -skeletonfolder=/path/to/skeleton +datafolder=/home/user/subjectA +skeletonfolder=/home/user singularity exec -B ${datafolder} -B ${skeletonfolder} psmd.sif psmd.sh \ - -d ${datafolder}/data.nii.gz -b ${datafolder}/data.bvals -r ${datafolder}/data.bvecs \ + -f ${datafolder}/subjectA_FA.nii.gz -m ${datafolder}/subjectA_MD.nii.gz \ -s ${skeletonfolder}/skeleton_mask_2019.nii.gz ``` @@ -54,4 +72,4 @@ The container recipe was in part generated by [Neurodocker](https://github.com/R ## License -The container will contain an FSL installation. Please make sure to comply with the [FSL license conditions](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Licence). Especially commercial use required a paid license of FSL! \ No newline at end of file +The container will contain an FSL installation. Please make sure to comply with the [FSL license conditions](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Licence). Especially commercial use requires a paid license of FSL! \ No newline at end of file diff --git a/singularity/singularity-psmd.txt b/singularity/singularity-psmd.txt index a83f3e2..6b3e349 100644 --- a/singularity/singularity-psmd.txt +++ b/singularity/singularity-psmd.txt @@ -72,42 +72,45 @@ mkdir -p /opt/fsl-6.0.3 curl -fsSL --retry 5 https://fsl.fmrib.ox.ac.uk/fsldownloads/fsl-6.0.3-centos6_64.tar.gz \ | tar -xz -C /opt/fsl-6.0.3 --strip-components 1 sed -i '$isource $FSLDIR/etc/fslconf/fsl.sh' $ND_ENTRYPOINT +bash /opt/fsl-6.0.3/etc/fslconf/fslpython_install.sh -f /opt/fsl-6.0.3 -# Reducing size of FSL installation by deleting some components not needed by PSMD -rm -r /opt/fsl-6.0.3/data/first/ -rm -r /opt/fsl-6.0.3/src -rm -r /opt/fsl-6.0.3/bin/probtrackx2_gpu -rm -r /opt/fsl-6.0.3/bin/mist -rm -r /opt/fsl-6.0.3/bin/melodic +# Thin out FSL installation by deleting some components not needed by PSMD +rm -r /opt/fsl-6.0.3/bin/contrast_mgr +rm -r /opt/fsl-6.0.3/bin/fabber rm -r /opt/fsl-6.0.3/bin/fabber_asl rm -r /opt/fsl-6.0.3/bin/fabber_cest -rm -r /opt/fsl-6.0.3/bin/probtrackx2 -rm -r /opt/fsl-6.0.3/bin/run_mesh_utils -rm -r /opt/fsl-6.0.3/bin/fabber_dualecho -rm -r /opt/fsl-6.0.3/bin/fdt_matrix_merge -rm -r /opt/fsl-6.0.3/bin/fabber_dsc rm -r /opt/fsl-6.0.3/bin/fabber_dce -rm -r /opt/fsl-6.0.3/bin/mvntool -rm -r /opt/fsl-6.0.3/bin/fabber +rm -r /opt/fsl-6.0.3/bin/fabber_dsc +rm -r /opt/fsl-6.0.3/bin/fabber_dualecho rm -r /opt/fsl-6.0.3/bin/fabber_dwi -rm -r /opt/fsl-6.0.3/bin/flameo -rm -r /opt/fsl-6.0.3/bin/fabber_t1 rm -r /opt/fsl-6.0.3/bin/fabber_qbold -rm -r /opt/fsl-6.0.3/bin/surf_proj -rm -r /opt/fsl-6.0.3/bin/probtrackx -rm -r /opt/fsl-6.0.3/bin/surf2surf +rm -r /opt/fsl-6.0.3/bin/fabber_t1 +rm -r /opt/fsl-6.0.3/bin/fdt_matrix_merge rm -r /opt/fsl-6.0.3/bin/film_gls -rm -r /opt/fsl-6.0.3/bin/xfibres -rm -r /opt/fsl-6.0.3/bin/ttoz -rm -r /opt/fsl-6.0.3/bin/ttologp -rm -r /opt/fsl-6.0.3/bin/ftoz -rm -r /opt/fsl-6.0.3/bin/contrast_mgr -rm -r /opt/fsl-6.0.3/bin/qboot -rm -r /opt/fsl-6.0.3/bin/vecreg -rm -r /opt/fsl-6.0.3/bin/swe +rm -r /opt/fsl-6.0.3/bin/flameo rm -r /opt/fsl-6.0.3/bin/fsl_mvlm +rm -r /opt/fsl-6.0.3/bin/ftoz +rm -r /opt/fsl-6.0.3/bin/melodic +rm -r /opt/fsl-6.0.3/bin/mist rm -r /opt/fsl-6.0.3/bin/mm +rm -r /opt/fsl-6.0.3/bin/mvntool +rm -r /opt/fsl-6.0.3/bin/probtrackx +rm -r /opt/fsl-6.0.3/bin/probtrackx2 +rm -r /opt/fsl-6.0.3/bin/probtrackx2_gpu rm -r /opt/fsl-6.0.3/bin/pvmfit +rm -r /opt/fsl-6.0.3/bin/qboot +rm -r /opt/fsl-6.0.3/bin/run_mesh_utils +rm -r /opt/fsl-6.0.3/bin/surf_proj +rm -r /opt/fsl-6.0.3/bin/surf2surf +rm -r /opt/fsl-6.0.3/bin/swe +rm -r /opt/fsl-6.0.3/bin/ttologp +rm -r /opt/fsl-6.0.3/bin/ttoz +rm -r /opt/fsl-6.0.3/bin/vecreg +rm -r /opt/fsl-6.0.3/bin/xfibres +rm -r /opt/fsl-6.0.3/data/first/ +rm -r /opt/fsl-6.0.3/extras +rm -r /opt/fsl-6.0.3/fslpython/pkgs +rm -r /opt/fsl-6.0.3/src # PSMD apt-get update -qq From 389a01e4c367d9986f39e5f9aae33391dcbffa2e Mon Sep 17 00:00:00 2001 From: Marco Duering Date: Tue, 10 Nov 2020 13:55:54 +0100 Subject: [PATCH 3/4] doc fix --- singularity/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/singularity/README.md b/singularity/README.md index 7adc54d..ae6137b 100644 --- a/singularity/README.md +++ b/singularity/README.md @@ -4,7 +4,7 @@ Using containers can solve issues arising from dependencies and heterogeneous en Singularity is a well-established container solution, developed with scientific computing and deployment on HPC infrastructure (compute cluster) in mind. -This singularity recipe installs FSL 6.0.3 and the current version of the PSMD script into a container using Ubuntu Bionic as the operating system. +This singularity recipe installs FSL 6.0.3 and the latest version of the PSMD script into a container using Ubuntu Bionic as the operating system. > If you want to build the container with a specific version of PSMD, please see the detailed instructions below! @@ -30,7 +30,7 @@ sudo singularity build psmd.sif singularity-psmd.txt ### Using a specific version of PSMD in the container -By default, the container will use the latest version of the psmd script from the repository. If you want to run a specific version, substitute the URL for the wget download with one of the follwoing: +By default, the container will use the latest version of the psmd script from the repository. To run a specific version, you need to edit the recipe file. Find the following line: `wget -O /psmd/psmd.sh https://raw.githubusercontent.com/miac-research/psmd/main/psmd.sh` and substitute the URL with one of the following URLs: | version | URL | | --- | --- | From a021d0a2ed3c7b70e9b9130c141ef956583b4b3a Mon Sep 17 00:00:00 2001 From: Marco Duering Date: Wed, 11 Nov 2020 09:03:54 +0100 Subject: [PATCH 4/4] v1.7 Singularity Beta --- README.md | 13 ++++++++++--- singularity/README.md | 18 ++++++++++-------- singularity/singularity-psmd.txt | 10 +++++++--- 3 files changed, 27 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 544b149..326d491 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,13 @@ PSMD is a robust, fully-automated and easy-to-implement marker for cerebral smal **For more information on usage, including FAQ, please visit [www.psmd-marker.com](https://www.psmd-marker.com).** +## Usage -## Contents +We recommend downloading one of our [releases](https://github.com/miac-research/psmd/releases) (for a new project, take the latest release). It is best practice to stick with one release in a given project. For even better replicability and traceability, consider using the [container version](https://github.com/miac-research/psmd/tree/main/singularity) of PSMD. + +For more information, please see the project website at [www.psmd-marker.com](https://www.psmd-marker.com). + +## Contents of download packages * `psmd.sh` - Main analysis script * `skeleton_mask_2019.nii.gz` - Updated (2019) skeleton mask image @@ -21,12 +26,14 @@ See the [GitHub releases page](https://github.com/miac-research/psmd/releases) f ## Roadmap of future development -See the [GitHub issues page](https://github.com/miac-research/psmd/issues) for current development topics. +See the [GitHub issues page](https://github.com/miac-research/psmd/issues) for current development topics. If you found a bug or have suggestions for new features, please feel free to open an issue. ## License -BSD 3-clause. Please see the `LICENSE` file provided in this repository. +The script itself is published under the BSD 3-clause license. Please see the `LICENSE` file provided in this repository. + +An [FSL license](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Licence) is required to run PSMD. ## Support diff --git a/singularity/README.md b/singularity/README.md index ae6137b..9b7d8f1 100644 --- a/singularity/README.md +++ b/singularity/README.md @@ -1,10 +1,12 @@ -# PSMD Singularity Conatiner +# PSMD Singularity Conatainer BETA -Using containers can solve issues arising from dependencies and heterogeneous environments. +**The container version is still in Beta. Please report any bugs on the [issues page](https://github.com/miac-research/psmd/issues). + +Using containers can solve problems arising from dependencies and heterogeneous environments. Singularity is a well-established container solution, developed with scientific computing and deployment on HPC infrastructure (compute cluster) in mind. -This singularity recipe installs FSL 6.0.3 and the latest version of the PSMD script into a container using Ubuntu Bionic as the operating system. +This singularity recipe installs FSL 6.0.3 and the latest version of the PSMD script into a container using Ubuntu Bionic as operating system. > If you want to build the container with a specific version of PSMD, please see the detailed instructions below! @@ -14,7 +16,7 @@ This singularity recipe installs FSL 6.0.3 and the latest version of the PSMD sc - Installation of [singularity](https://sylabs.io) version 3.6 or newer, preferably installed on Linux - Linux is needed for building the container. A virtual machine setup is available for Windows and Mac users, please consult the [Singularity user guide](https://sylabs.io/docs/) for details. -- After building, the built container can also be executed on macOS using [Singularity Desktop](https://sylabs.io/singularity-desktop-macos/). +- After building the container, besides Linux, it can also be executed on macOS using [Singularity Desktop](https://sylabs.io/singularity-desktop-macos/). ### Build the container @@ -26,11 +28,11 @@ wget https://raw.githubusercontent.com/miac-research/psmd/main/singularity/singu sudo singularity build psmd.sif singularity-psmd.txt ``` -> Please note that the container will be very large, usually around 2.5 GB. Also note that in order to save space, some parts of the FSL installation are deleted. The container does not contain a fully functional FSL installation, but a minimal install suited for diffusion processing and PSMD calculation. You can modify the recipe file in order to retain a full FSL install. +> Please note that the container will be quite large, usually around 2.5 GB. Also note that in order to save space, some parts of the FSL installation are deleted. The container does not contain a fully functional FSL installation, but a minimal install suited for diffusion processing and PSMD calculation. You can modify the recipe file in order to retain a full FSL install. ### Using a specific version of PSMD in the container -By default, the container will use the latest version of the psmd script from the repository. To run a specific version, you need to edit the recipe file. Find the following line: `wget -O /psmd/psmd.sh https://raw.githubusercontent.com/miac-research/psmd/main/psmd.sh` and substitute the URL with one of the following URLs: +By default, the container will use the latest version of the psmd script from the repository. To run a specific version (from a specific release, you need to edit the recipe file. Find the following line: `wget -O /psmd/psmd.sh https://raw.githubusercontent.com/miac-research/psmd/main/psmd.sh` and substitute the URL with one of the following URLs: | version | URL | | --- | --- | @@ -47,7 +49,7 @@ By default, the container will use the latest version of the psmd script from th singularity exec psmd.sif psmd.sh ``` -- After this command, specify the options as usually for the psmd script, e.g. +- After this command, specify the options as usually for the psmd script (see [www.psmd-marker.com](https://www.psmd-marker.com) for details on available options), e.g. ```bash singularity exec psmd.sif psmd.sh -d data.nii.gz -b data.bvals \ @@ -72,4 +74,4 @@ The container recipe was in part generated by [Neurodocker](https://github.com/R ## License -The container will contain an FSL installation. Please make sure to comply with the [FSL license conditions](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Licence). Especially commercial use requires a paid license of FSL! \ No newline at end of file +The container will contain an (incomplete) FSL installation. Please make sure to comply with the [FSL license conditions](https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Licence). Especially commercial use requires a paid license of FSL! \ No newline at end of file diff --git a/singularity/singularity-psmd.txt b/singularity/singularity-psmd.txt index 6b3e349..6ceaab9 100644 --- a/singularity/singularity-psmd.txt +++ b/singularity/singularity-psmd.txt @@ -1,18 +1,22 @@ # PSMD Singularity Container Definition File -# https://www.psmd-marker.com ###### ADD UPDATED URL HERE ###### +# https://www.psmd-marker.com # Partly generated by: Neurodocker version 0.7.0 # https://github.com/ReproNim/neurodocker +# Executing this container requires a valid license of FSL. +# Please see https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Licence + Bootstrap: docker From: ubuntu:bionic-20200921 %help -Visit the PSMD repository for help: https://github.com/miac-research/psmd +Visit the PSMD repository https://github.com/miac-research/psmd +or the PSMD homepage https://www.psmd-marker.com for help. %labels Author Marco Duering - Maintainer MIAC AG + Maintainer MIAC AG Recipe_version v1.0 %post