Fmriprep with singularity

I’m trying to get fmriprep working on an HPC system running CentOS 6.3 using singularity (2.2.99).

To create a singularity image, I have followed the instructions here: http://fmriprep.readthedocs.io/en/latest/installation.html#singularity-container

I’ve downloaded the ds101 BIDS compliant dataset from here: https://github.com/INCF/BIDS-examples

To test one subject, I’m using the command as follows:

/opt/singularity/bin/singularity run /data6/buchsbaum_lab/projects/fmriprep/fmriprep.img /data6/buchsbaum_lab/projects/ds101 out/ participant --participant_label sub-01

This results in the error:

(My message got sent inadvertently)

the error is printed below:

/opt/singularity/bin/singularity run /data6/buchsbaum_lab/projects/fmriprep/fmriprep.img /data6/buchsbaum_lab/projects/ds101 out/ participant --participant_label sub-01
/usr/local/miniconda/lib/python3.6/site-packages/sklearn/cross_validation.py:44: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
“This module will be removed in 0.20.”, DeprecationWarning)
/usr/local/miniconda/lib/python3.6/site-packages/nipype/workflows/dmri/mrtrix/group_connectivity.py:16: UserWarning: cmp not installed
warnings.warn(‘cmp not installed’)
Traceback (most recent call last):
File “/usr/local/miniconda/bin/fmriprep”, line 11, in
load_entry_point(‘fmriprep==0.3.1’, ‘console_scripts’, ‘fmriprep’)()
File “/usr/local/miniconda/lib/python3.6/site-packages/fmriprep/run_workflow.py”, line 88, in main
create_workflow(opts)
File “/usr/local/miniconda/lib/python3.6/site-packages/fmriprep/run_workflow.py”, line 164, in create_workflow
settings=settings, run_uuid=run_uuid)
File “/usr/local/miniconda/lib/python3.6/site-packages/fmriprep/workflows/base.py”, line 42, in base_workflow_enumerator
settings=settings)
File “/usr/local/miniconda/lib/python3.6/site-packages/fmriprep/workflows/base.py”, line 66, in base_workflow_generator
subject_id, task_id if task_id else ‘’))
Exception: No BOLD images found for participant sub-01 and task . All workflows require BOLD images.

Most likely your data location is not accessible from singularity containers with the current singularity configuration.

Could you try the following:

/opt/singularity/bin/singularity exec /data6/buchsbaum_lab/projects/fmriprep/fmriprep.img ls /data6/buchsbaum_lab/projects/ds101

I get this:

ls: cannot access ‘/data6/buchsbaum_lab/projects/ds101’: No such file or directory

1 Like

moving the data to my home directory solved the issue. I need to “bind” data6 I suppose.

1 Like

Depending on the singularity version and kernel capabilities you might be able to bind/mount the /data6 directory with the -b flag.