Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Singularity Desktop for Mac deprecated
Singularity Bind options extended
  • Loading branch information
marcoduering authored May 1, 2022
1 parent 7ec7206 commit d2e7985
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions singularity/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
# PSMD Singularity Conatainer BETA
# PSMD Singularity Conatainer

**The container version is still in Beta. Please report any bugs on the [issues page](https://github.com/miac-research/psmd/issues).**
**Please report any bugs with the Singularity container 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 operating system.

> If you want to build the container with a specific version of PSMD, please see the detailed instructions below!
> If you want to build the container with a specific version of PSMD, please see the detailed instructions below. Alternatively, you can use a psmd main script outside the container and start it with the container.
## IMPORTANT DISCLAIMER

PSMD is NOT a medical device and therefore **for research use only**. Do not use PSMD for diagnosis, prognosis, monitoring or any other clinical routine use. Any application in clinical routine is forbidden by law, e.g. by Medical Device Regulation article 5 in the EU.
PSMD is NOT a medical device and therefore **for research use only**. Do not use PSMD for diagnosis, prognosis, monitoring or any other clinical routine use. Any application of the psmd script in clinical routine is forbidden by law, e.g. by Medical Device Regulation article 5 in the EU.

## 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 container, besides Linux, it can also be executed on macOS using [Singularity Desktop](https://sylabs.io/singularity-desktop-macos/).
- Linux operating system (e.g. inside a virutal machine)
- Installation of [singularity](https://sylabs.io) version 3.6 or newer

### Build the container

- Download the Singularity recipe file `singularity-psmd.txt`
- Build the container `psmd.sif` from the recipe file (using sudo)
- Build the container `psmd.sif` from the recipe file (as root or using sudo)

```
wget https://raw.githubusercontent.com/miac-research/psmd/main/singularity/singularity-psmd.txt
Expand Down Expand Up @@ -57,17 +56,17 @@ singularity exec psmd.sif psmd.sh
- 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 \
singularity exec -B $(pwd) 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.
- **IMPORTANT**: By default, the container has access only to your home folder. 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. This is why `-B $(pwd)` was added to the command above. It will bind the current folder into the container.

- 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`.
- You can also bind specific paths to the container. 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/skeleton`.

```bash
datafolder=/home/user/subjectA
skeletonfolder=/home/user
skeletonfolder=/home/user/skeleton
singularity exec -B ${datafolder} -B ${skeletonfolder} psmd.sif psmd.sh \
-f ${datafolder}/subjectA_FA.nii.gz -m ${datafolder}/subjectA_MD.nii.gz \
-s ${skeletonfolder}/skeleton_mask_2019.nii.gz
Expand All @@ -79,4 +78,5 @@ The container recipe was in part generated by [Neurodocker](https://github.com/R

## License

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!
While PSMD depends on FSL, it is not part of FSL. FSL is only used as a "library" when installed into the container. The container will thus 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!**

0 comments on commit d2e7985

Please sign in to comment.