Fmriprep-v1.3.0 Error on Singularity Container

fmriprep

#1

I recently upgraded my fmriprep singularity image to version 1.3.0. Since my system does not allow docker images, I took a docker image and converted it using docker2singularity. The command I used to run fmriprep is:

unset PYTHONPATH; singularity run $HOME/*fmriprep*img 			\
			$data_dir $data_dir 											\
			participant 													\
			--participant-label $s 											\
			--fs-license-file $HOME/license.txt 							\
			--use-aroma 													\
			--aroma-melodic-dimensionality 100 								\
			--output-space template fsaverage								\
			--write-graph 													\
			--nthread 10												\
			--omp-nthreads 8 									\
			--stop-on-first-crash 											\
			--resource-monitor 												\
			--low-mem 														\
			--mem_mb 55000 												\
			--use-plugin $HOME/plugin_${s}.yml 								\
			-w $data_dir

The error message I’m getting is:

This dataset appears to be BIDS compatible.
        Summary:                  Available Tasks:        Available Modalities: 
        978 Files, 12.41GB        std                     /participants         
        6 - Subjects                                      T1w                   
        1 - Session                                       T2w                   
                                                          bold                  
                                                          fieldmap              

If you have any questions please post on https://neurostars.org/tags/bids

Making sure the input data is BIDS compliant (warnings can be ignored in most cases).
190212-15:09:03,867 nipype.workflow IMPORTANT:
	 
    Running fMRIPREP version 1.3.0:
      * BIDS dataset path: /N/dc2/scratch/dlevitas/fMRI_data/std/bids.
      * Participant list: ['000'].
      * Run identifier: 20190212-150903_83936dca-6f28-4cb8-a851-c4635ce51106.
    
/usr/local/miniconda/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
/usr/local/miniconda/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
/usr/local/miniconda/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
/usr/local/miniconda/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
/usr/local/miniconda/lib/python3.7/site-packages/nilearn/datasets/neurovault.py:16: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Container
/usr/local/miniconda/lib/python3.7/site-packages/datalad/utils.py:71: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5
  = platform.linux_distribution()[:2]
/usr/local/miniconda/lib/python3.7/site-packages/datalad/utils.py:847: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  is_decorating = not kwargs and len(args) == 1 and isinstance(args[0], collections.Callable)
/usr/local/miniconda/lib/python3.7/site-packages/datalad/support/param.py:30: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  _KNOWN_ARGS = getargspec(argparse.Action.__init__)[0] + ['action']
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:216: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  args, varargs, varkw, defaults = getargspec(func)
/usr/local/miniconda/lib/python3.7/site-packages/skimage/__init__.py:80: ResourceWarning: unclosed file <_io.TextIOWrapper name='/usr/local/miniconda/lib/python3.7/site-packages/pytest.py' mode='r' encoding='utf-8'>
  imp.find_module('pytest')
/usr/local/miniconda/lib/python3.7/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
  return f(*args, **kwds)
/usr/local/miniconda/lib/python3.7/site-packages/yaml/constructor.py:126: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  if not isinstance(key, collections.Hashable):
/usr/local/miniconda/lib/python3.7/site-packages/networkx/classes/reportviews.py:95: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Mapping, Set, Iterable
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
[WARNING] It is highly recommended to configure git first (set both user.name and user.email) before using DataLad. Failed to verify that git is configured: CommandError: command '['git', 'config', 'user.name']' failed with exitcode 1
| Failed to run ['git', 'config', 'user.name'] under None. Exit code=1. out= err= [cmd.py:run:530]CommandError: command '['git', 'config', 'user.email']' failed with exitcode 1
| Failed to run ['git', 'config', 'user.email'] under None. Exit code=1. out= err= [cmd.py:run:530].  Some operations might fail or not perform correctly. 
190212-15:09:15,865 nipype.workflow IMPORTANT:
	 Creating bold processing workflow for "/N/dc2/scratch/dlevitas/fMRI_data/std/bids/sub-000/func/sub-000_task-std_run-01_bold.nii.gz" (0.30 GB / 870 TRs). Memory resampled/largemem=1.21/3.84 GB.
190212-15:09:15,867 nipype.workflow IMPORTANT:
	 No single-band-reference found for sub-000_task-std_run-01_bold.nii.gz
190212-15:09:25,938 nipype.workflow IMPORTANT:
	 Slice-timing correction will be included.
190212-15:09:27,770 nipype.workflow IMPORTANT:
	 SDC: fieldmap estimation of type "epi" intended for /N/dc2/scratch/dlevitas/fMRI_data/std/bids/sub-000/func/sub-000_task-std_run-01_bold.nii.gz found.
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/layout.py:62: UserWarning: Accessing entities as attributes is deprecated as of 0.7. Please use the .entities dictionary instead (i.e., .entities['suffix'] instead of .suffix.
  % (attr, attr))
/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/layout.py:62: UserWarning: Accessing entities as attributes is deprecated as of 0.7. Please use the .entities dictionary instead (i.e., .entities['suffix'] instead of .suffix.
  % (attr, attr))
/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/layout.py:62: UserWarning: Accessing entities as attributes is deprecated as of 0.7. Please use the .entities dictionary instead (i.e., .entities['suffix'] instead of .suffix.
  % (attr, attr))
/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/layout.py:62: UserWarning: Accessing entities as attributes is deprecated as of 0.7. Please use the .entities dictionary instead (i.e., .entities['suffix'] instead of .suffix.
  % (attr, attr))
/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/layout.py:62: UserWarning: Accessing entities as attributes is deprecated as of 0.7. Please use the .entities dictionary instead (i.e., .entities['suffix'] instead of .suffix.
  % (attr, attr))
/usr/local/miniconda/lib/python3.7/site-packages/bids/layout/layout.py:62: UserWarning: Accessing entities as attributes is deprecated as of 0.7. Please use the .entities dictionary instead (i.e., .entities['suffix'] instead of .suffix.
  % (attr, attr))
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/base.py:480: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  argspec = getargspec(call)
Process Process-2:
Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.7/site-packages/datalad/support/annexrepo.py", line 2297, in _run_annex_command_json
    **kwargs)
  File "/usr/local/miniconda/lib/python3.7/site-packages/datalad/support/annexrepo.py", line 1053, in _run_annex_command
    raise e
  File "/usr/local/miniconda/lib/python3.7/site-packages/datalad/support/annexrepo.py", line 1045, in _run_annex_command
    return self.cmd_call_wrapper.run(cmd_list, env=env, **kwargs)
  File "/usr/local/miniconda/lib/python3.7/site-packages/datalad/cmd.py", line 670, in run
    cmd, env=self.get_git_environ_adjusted(env), *args, **kwargs)
  File "/usr/local/miniconda/lib/python3.7/site-packages/datalad/cmd.py", line 530, in run
    raise CommandError(str(cmd), msg, status, out[0], out[1])
datalad.support.exceptions.CommandError: CommandError: command '['git', '-c', 'receive.autogc=0', '-c', 'gc.auto=0', 'annex', 'get', '--json', '-J8', '--json-progress', '--', 'tpl-MNI152NLin2009cAsym_res-01_desc-carpet_dseg.nii.gz']' failed with exitcode 1
Failed to run ['git', '-c', 'receive.autogc=0', '-c', 'gc.auto=0', 'annex', 'get', '--json', '-J8', '--json-progress', '--', 'tpl-MNI152NLin2009cAsym_res-01_desc-carpet_dseg.nii.gz'] under '/opt/templateflow/tpl-MNI152NLin2009cAsym'. Exit code=1. out={"command":"get","wanted":[{"here":false,"uuid":"00000000-0000-0000-0000-000000000001","description":"web"},{"here":false,"uuid":"be2ea00d-3ca0-4b5c-be61-343b867dbe28","description":"oesteban@dendrite:~/datalad/templateflow/tpl-MNI152NLin2009cAsym"},{"here":false,"uuid":"cd0583d3-c2ff-4c34-bcd4-dcda2ee2e3b9","description":"box.com"}],"note":"Unable to access these remotes: web\nTry making some of these repositories available:\n\t00000000-0000-0000-0000-000000000001 -- web\n \tbe2ea00d-3ca0-4b5c-be61-343b867dbe28 -- oesteban@dendrite:~/datalad/templateflow/tpl-MNI152NLin2009cAsym\n \tcd0583d3-c2ff-4c34-bcd4-dcda2ee2e3b9 -- box.com\n\n(Note that these git remotes have annex-ignore set: origin)","skipped":[],"success":false,"key":"URL-s451304--https://files.osf.io/v1/resourc-2ea55261c880c672b93ccefbad06ab52","file":"tpl-MNI152NLin2009cAsym_res-01_desc-carpet_dseg.nii.gz"}
 err=  not enough free space, need 402.73 kB more (use --force to override this check or adjust annex.diskreserve)
git-annex: get: 1 failed


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/local/miniconda/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/cli/run.py", line 751, in build_workflow
    ignore_aroma_err=opts.ignore_aroma_denoising_errors,
  File "/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/workflows/base.py", line 218, in init_fmriprep_wf
    ignore_aroma_err=ignore_aroma_err,
  File "/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/workflows/base.py", line 516, in init_single_subject_wf
    num_bold=len(subject_data['bold']))
  File "/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/workflows/bold/base.py", line 683, in init_func_preproc_wf
    name='carpetplot_wf')
  File "/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/workflows/bold/confounds.py", line 364, in init_carpetplot_wf
    '_res-01_desc-carpet_dseg.nii.gz'),
  File "/usr/local/miniconda/lib/python3.7/site-packages/templateflow/api.py", line 24, in get
    out_file = api.get(filepath)
  File "/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/utils.py", line 478, in eval_func
    return return_func(generator_func)(*args, **kwargs)
  File "/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/utils.py", line 466, in return_func
    results = list(results)
  File "/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/utils.py", line 421, in generator_func
    result_renderer, result_xfm, _result_filter, **_kwargs):
  File "/usr/local/miniconda/lib/python3.7/site-packages/datalad/interface/utils.py", line 490, in _process_results
    for res in results:
  File "/usr/local/miniconda/lib/python3.7/site-packages/datalad/distribution/get.py", line 622, in __call__
    jobs=jobs):
  File "/usr/local/miniconda/lib/python3.7/site-packages/datalad/support/gitrepo.py", line 301, in newfunc
    result = func(self, files_new, *args, **kwargs)
  File "/usr/local/miniconda/lib/python3.7/site-packages/datalad/support/annexrepo.py", line 1330, in get
    **kwargs
  File "/usr/local/miniconda/lib/python3.7/site-packages/datalad/support/annexrepo.py", line 2314, in _run_annex_command_json
    sizemore_msg=out_of_space_re.groups()[0])
datalad.support.exceptions.OutOfSpaceError: OutOfSpaceError: command 'annex get' needs 402.73 kB more

I’ve run fmriprep version 1.2.3 with the same command, and not had an issue, so I’m having trouble diagnosing the problem.

Thank you for the help.


#2

Hi, the problem is that we’ve moved to a new way of pulling templates, and it turns out that Singularity does not handle it well at all. Please see FMRIPREP from Singularity: UnboundLocalError for a workaround.