Use fMRIPrep on Cluster

After you connect to the head node, you can start a Slurm session using the following command, for example:

srun -c 12 --x11 --pty bash -i
Then run the following commands to set up the environment:
module load nodejs
module load afni
module load ants
module load c3d
module load connectome-workbench
source /opt/scripts/user/conda3-2020.11.init.sh
conda activate fmriprep
The first time you run the above “module load afni” command, it will configure AFNI for you and copy the default data to your home folder. Configuration and data copying won’t happen again unless your “~/.afnirc” file is deleted or modified, or a newer version of AFNI is available on the cluster.

You can then run “fmriprep” command, for example, to check the vesion:
fmriprep --version

The current fMRIPrep version is fMRIPrep v23.0.1 (Jan 14, 2021).