fMRIPREP docker debugging

fmriprep
docker

#1

Getting this error message when running fMRIPrep.

I’m running in a virtualenv…I think maybe its an environment problem??

(fmriprep)slab@freewill:/net/pizza/BPReward_BIDS$ fmriprep-docker /net/pizza/BPReward_BIDS/ /net/pizza/BPReward_BIDS/derivatives/ --fs-license-file /usr/local/freesurfer/freesurfer_6.0.0_centos6/license.txt --nthreads 8 --ignore slicetiming --use-syn-sdc --no-freesurfer
RUNNING: docker run --rm -it -v /usr/local/freesurfer/freesurfer_6.0.0_centos6/license.txt:/opt/freesurfer/license.txt:ro -v /net/pizza/BPReward_BIDS/:/data:ro -v /net/pizza/BPReward_BIDS/derivatives/:/out poldracklab/fmriprep:1.0.6-2 /data /out participant --nthreads 12 --ignore slicetiming --use-syn-sdc --no-freesurfer
Process Process-2:
Traceback (most recent call last):
File “/usr/local/miniconda/lib/python3.6/multiprocessing/process.py”, line 249, in _bootstrap
self.run()
File “/usr/local/miniconda/lib/python3.6/multiprocessing/process.py”, line 93, in run
self._target(*self._args, **self._kwargs)
File “/usr/local/miniconda/lib/python3.6/site-packages/fmriprep/cli/run.py”, line 370, in build_workflow
os.makedirs(log_dir, exist_ok=True)
File “/usr/local/miniconda/lib/python3.6/os.py”, line 210, in makedirs
makedirs(head, mode, exist_ok)
File “/usr/local/miniconda/lib/python3.6/os.py”, line 220, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: ‘/out/fmriprep’
Traceback (most recent call last):
File “/usr/local/miniconda/bin/fmriprep”, line 11, in
load_entry_point(‘fmriprep==1.0.6.post2’, ‘console_scripts’, ‘fmriprep’)()
File “/usr/local/miniconda/lib/python3.6/site-packages/fmriprep/cli/run.py”, line 247, in main
fmriprep_wf = retval[‘workflow’]
File “”, line 2, in getitem
File “/usr/local/miniconda/lib/python3.6/multiprocessing/managers.py”, line 772, in _callmethod
raise convert_to_error(kind, result)
KeyError: ‘workflow’
fMRIPrep: Please report errors to https://github.com/poldracklab/fmriprep/issues


#2

This is probably the key piece of information:
-v /net/pizza/BPReward_BIDS/derivatives/:/out

Could you write to /net/pizza/BPReward_BIDS/derivatives/ outside of the container?

If you run shell inside the container, by typing:

docker run --rm -it -v /usr/local/freesurfer/freesurfer_6.0.0_centos6/license.txt:/opt/freesurfer/license.txt:ro -v /net/pizza/BPReward_BIDS/:/data:ro -v /net/pizza/BPReward_BIDS/derivatives/:/out --entrypoint=bash poldracklab/fmriprep:1.0.6-2

Can you write to /out?


#3

It was a permissions issue, once I changed to root it ran.

Even after changing permissions for /out I could not get this command to run (still getting permission denied error)
“fmriprep-docker /net/pizza/BPReward_BIDS/ /net/pizza/BPReward_BIDS/derivatives/ --fs-license-file /usr/local/freesurfer/freesurfer_6.0.0_centos6/license.txt --nthreads 8 --ignore slicetiming --use-syn-sdc --no-freesurfer”

BUT… I could run this one.
“docker run --rm -it -v /usr/local/freesurfer/freesurfer_6.0.0_centos6/license.txt:/opt/freesurfer/license.txt:ro -v /net/pizza/BPReward_BIDS/:/data:ro -v /net/pizza/BPRward_BIDS/derivatives/:/out poldracklab/fmriprep:1.0.6-2 /data /out/ participant --nthreads 8 --ignore slicetiming --use-syn-sdc --no-freesurfer”

Thanks for the tips!


#4

Oh no, another error :grimacing: This time in regards to the T1w image…I’ve loaded the T1w image in FSLView and SPM coreg, and checked that it isn’t a zipped file named wrong… and nothing seems to be wrong with it. But I get the following error:

[Node] Error on “fmriprep_wf.single_subject_0001_wf.anat_preproc_wf.anat_template_wf.t1_template_dimensions”

nibabel.filebased.images.ImageFileError: Cannot work out file type of “/data/sub-0001/anat/sub-0001_T1w.nii”

Anyone experienced this before?


#5

Might be good to open a new topic for each new issue/question (gives better exposure and helps others find solutions). From your description it is not clear if the error is in FSLView or FMRIPREP…