Running fMRIprep-docker on a test data set found in Downloads/fmriprep_data. Seems to be setting the data path to “/data/” rather than the actual path I have input?
Command used (and if a helper script was used, a link to the helper script or the command generated):
File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/fmriprep/utils/misc.py", line 57, in estimate_bold_mem_usage
img = nb.load(bold_fname)
^^^^^^^^^^^^^^^^^^^
File "/opt/conda/envs/fmriprep/lib/python3.11/site-packages/nibabel/loadsave.py", line 102, in load
raise FileNotFoundError(f"No such file or no access: '{filename}'")
FileNotFoundError: No such file or no access: '/data/sub-01/func/sub-01_task-flanker_run-1_bold.nii.gz'
If you paste the RUNNING section in here, people can answer your questions in more detail. The short story is that there will be something like:
-v $HOME/Downloads/fmriprep_data/:/data:ro
That maps the location from your host system into the /data location inside the container. When a program is run in the container, it will see the contents of $HOME/Downloads/fmriprep_data at /data. (The :ro indicates read-only.)
In principle, we could map -v $HOME/Downloads/fmriprep_data:$HOME/Downloads/fmriprep_data:ro, however if somehow the data directory being mapped overlaid something important in the container, there could be surprising and difficult-to-diagnose failures. It’s simpler to just use a known path inside the container.
Anyway, once you see the RUNNING: command, you can edit it however you like and run docker directly.
The error is fairly plain: The process inside the docker container cannot open the file. It could be a permissions error or a broken symlink. What happens when you run the following?
ls -l /Users/pmxtl3/Downloads/fmriprep_data/sub-01/func/
file /Users/pmxtl3/Downloads/fmriprep_data/sub-01/func/sub-01_task-flanker_run-1_bold.nii.gz
I would also try opening the file with some tool on your host system, such as mricron. If that all works, then there’s some issue that will only be apparent inside the container. To diagnose that, add --shell to your fmriprep-docker command to open a shell that will see the system the same way the fMRIPrep process does, and run the same checks:
ls -l /data/sub-01/func/
file /data/sub-01/func/sub-01_task-flanker_run-1_bold.nii.gz