Fmriprep singularity environment variable

Hi fmriprep experts,

Just to want to clarify a concern. I run fmriprep using Singularity and use --cleanenv flag in my command line, as recommended in the documentation. Because we have multiple versions of freesurfer and FSL installed, how would fmriprep figure out the correct version of freesurfer and FSL to use if the environment variables are cleared?
I tried processing one subject and in the method section of the final .html output, it mentioned that segmentation was performed using fast (FSL 5.0.9), but we do not have FSL 5.0.9 installed (we have FSL 5.0.10 though). So I am a bit confused.

Hi @joshZ,

Good question, and one that lays at the heart of why singularity is so cool.
The singularity image you ran contains its own installation of FSL, freesurfer, AFNI as well as the fmriprep package (and more!). You can take a look at the instructions to install everything needed to run fmriprep. Those instructions are used to build the singularity image you used for your analysis.

That’s why the --cleanenv flag is important, because singularity could accidentally use your FSL installation instead of the FSL install that’s included in the singularity image, and that could result in unexpected behavior.

Let me know if you have additional questions and welcome to neurostars!
James

Thanks so much for the clarification!