Runing Singularity/ Docker fMRIprep


I am trying to run a docker image (fMRIprep) for the first time - so pardon me for the noob question.

  1. run
    singularity run [path to img] [other container specific arguements]
    srun singularity run [path to img] [other container specific arguements]
    srun singularity run --cleanenv [path to img] [other container specific arguements] and got the following error:
    [WARNING] DueCredit internal failure while running <function _get_active_due at 0x2b1a9e824b70>: PermissionError(13, ‘Permission denied’). Please report to developers at Issues · duecredit/duecredit · GitHub (
    2022-06-20 11:14:50,208 [ERROR ] Failed to import duecredit due to Both inactive and active collectors should be provided. Got active=None, inactive=InactiveDueCreditCollector() (

  2. exec
    srun singularity exec [path to img] [other container specific arguements], and got this error: /.singularity.d/actions/exec: 9: exec: /home/users/t/tanm/data/final_experiment/fmri/data4analyses/: Permission denied

  3. I attempted to use the argument bind -B, but got this error: ERROR : Image path doesn’t exists
    ABORT : Retval = 255

What should I change to be able to launch this docker image?

Thank you very much.

Mi Xue


Thanks to contact HPC team regarding this problem. If you need to use docker image on the cluster it is mandatory to usesingularity.

Usage of this tool is documented on the wiki :[]=singularity

Did you put the module load command on the top of your script?

ml GCC/9.3.0 Singularity/3.7.3-Go-1.14

Best regards,

1 Like


according to this link you can use directly singularity as we have version bigger than 2.5.

Build the fMRIpre image:

[sagon@login2.baobab fmirep]$ ml GCC/9.3.0 Singularity/3.7.3-Go-1.14
[sagon@login2.baobab fmirep]$ singularity build fmriprep-latest.simg docker://poldracklab/fmriprep:latest
INFO:    Starting build...
Getting image source signatures
Copying blob 0a01a72a686c done
INFO:    Creating SIF file...
INFO:    Build complete: fmriprep-latest.simg
[sagon@login2.baobab fmirep]$ singularity build fmriprep-latest.simg docker://poldracklab/fmriprep:latest�^C
[sagon@login2.baobab fmirep]$ ls -lah fmriprep-latest.simg
-rwxr-xr-x 1 sagon unige 4.6G Jun 22 10:53 fmriprep-latest.simg

Create an sbatch script


#SBATCH --partition=debug-cpu
#SBATCH --cpus-per-task=2

ml GCC/9.3.0 Singularity/3.7.3-Go-1.14

srun singularity run --cleanenv fmriprep-latest.simg \
    datadir outputdir \
    participant \
    --participant-label label

Run the script on a compute node:

[sagon@login2.baobab fmirep]$ sbatch

You should of course adapt the script to your needs.



awesome, thank you so much!

my only issue now is that the version of the image is not the latest, even though we stated ‘latest’ when downloading the image… though I guess this might be a problem on their side?


Yes issue is not from our side, this is due to the tag latest not pointing on the latest version, but you can easily replace “latest” by the appropriate version number :

poldracklab/fmriprep Tags | Docker Hub

Have a nice day,