Hi Steven,
Thanks for the quick and very helpful response. This all makes sense to me. I followed your recommendation and edited the command as follows.
#User inputs:
bids_root_dir=/lbc/lbc1/PREVENT_AD/PREVENT_AD_BIDS
bids_deriv_dir=/lbc/lbc1/PREVENT_AD/derivatives/rsFC/rsFC_fmriprep/derivatives
fs_dir=/lbc/lbc1/PREVENT_AD/derivatives/freesurfer
pybids_dir=/lbc/lbc1/PREVENT_AD/derivatives/rsFC/pybids_db
subj=0196
#Begin:
export TEMPLATEFLOW_HOME=/home/bic/collhugh/.cache/templateflow
export FS_LICENSE=/lbc/lbc1/PREVENT_AD/derivatives/rsFC/rsFC_fmriprep/license.txt
#Run fmriprep
docker run -ti --rm \
-v $bids_root_dir:/data:ro \
-v $bids_deriv_dir:/out \
nipreps/fmriprep:21.0.0 \
/data /out \
participant \
--participant-label $subj \
--skip-bids-validation \
--bids-database-dir $pybids_dir \
--md-only-boilerplate \
--fs-no-reconall \
--fs-subjects-dir $fs_dir \
--output-spaces T1w \
--ignore slicetiming fieldmaps sbref t2w flair \
--dummy-scans 4 \
--skull-strip-t1w force \
--me-output-echos \
--stop-on-first-crash \
--low-mem
It’s still appearing to hang on the pybids indexing without giving errors. I think this is probably because the pybids directory does not live in /out and is therefore not seen by Docker. So, I added a -v flag for the pybids directory (like the workdir in the last example here). But, this results in the earlier “root dir does not exist” error. I moved the database to /out in case -v can’t be used for any location, but got the same error. I’ll keep troubleshooting as it’s probably my misunderstanding of how docker works, but would welcome any suggestions.
Just to note, the derivatives folder - including pre-run freesurfer segmentations - lives outside of the BIDS directory. This is on purpose.