Symbolic links and fmriprep in singularity container

Summary of what happened:

I am trying to run fmriprep on a set of HCP data with pre/post treatment resting state and task data. All the original files exist in a colleague’s directory, and to conserve space in our lab drive, I am trying to use symbolic links to put them into bids format for fmriprep.
When I try to run fmriprep (submit to bsub queue on LPC cluster via singularity), I receive this error:

FileNotFoundError: No such file or no access: '/data/input/sub-s205/ses-baseline/func/sub-s205_ses-baseline_task-facematching_dir-AP_bold.nii.gz'

I tried following the recommendations from this previous topic, but nothing quite panned out.
I was able to determine that Singularity is able to read and appropriately interpret the images in their original location, but not in my softlinked bids directory. I can see the files if I ls the bids directory, but can’t successfully run a command like 3dinfo (which works for the data in the original location).
The original data and the the softlink directory are mounted on the same drive already, and I checked for any aliasing in the root names but found nothing.
Any recommendations for updating the binded paths or permissions, or any other thoughts or suggestions are welcome.
Thanks in advance!

Command used (and if a helper script was used, a link to the helper script or the command generated):

inputdir=/project/oathes_analysis2/individual_projects/mydir/bids
outputdir=/project/oathes_analysis2/individual_projects/mydir/fmriprep

singularity run --cleanenv \
  --no-home \
  -B ${jobTmpDir}:/tmp \
  -B "/project/bsc/shared/templateflow:/templateflow" \
  -B "/appl/freesurfer-7.1.1:/freesurfer" \
  -B ${inputdir}:/data/input \
  -B ${outputdir}:/data/output \
/project/oathes_group/singularity_images/fmriprep_20.2.6_fips.sif \
--fs-license-file /freesurfer/license.txt \
/data/input /data/output participant --skull-strip-template OASIS30ANTs \
--output-spaces MNI152NLin2009cAsym fsaverage5 T1w fsnative \
--cifti-output 91k \
--bold2t1w-dof 6 \
--dvars-spike-threshold 1.5 \
--fd-spike-threshold 0.5 \
--ignore slicetiming \
--notrack --nthreads 8 --omp-nthreads 7 --work-dir ${SINGULARITYENV_TMPDIR} --skip_bids_validation --stop-on-first-crash --verbose --participant-label $1

Version:

fmriprep_20.2.6_fips.sif

Environment (Docker, Singularity / Apptainer, custom installation):

Singularity v3.8.3

Relevant log outputs (up to 20 lines):

Process Process-2:
Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.7/site-packages/nibabel/loadsave.py", line 42, in load
    stat_result = os.stat(filename)
FileNotFoundError: [Errno 2] No such file or directory: '/data/input/sub-s205/ses-baseline/func/sub-s205_ses-baseline_task-facematching_dir-AP_bold.nii.gz'

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/workflow.py", line 82, in build_workflow
    retval["workflow"] = init_fmriprep_wf()
  File "/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/workflows/base.py", line 64, in init_fmriprep_wf
    single_subject_wf = init_single_subject_wf(subject_id)
  File "/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/workflows/base.py", line 304, in init_single_subject_wf
    func_preproc_wf = init_func_preproc_wf(bold_file)
  File "/usr/local/miniconda/lib/python3.7/site-packages/fmriprep/workflows/bold/base.py", line 148, in init_func_preproc_wf
    bold_file[0] if isinstance(bold_file, (list, tuple)) else bold_file
  File "/usr/local/miniconda/lib/python3.7/site-packages/nibabel/loadsave.py", line 44, in load
    raise FileNotFoundError(f"No such file or no access: '{filename}'")
FileNotFoundError: No such file or no access: '/data/input/sub-s205/ses-baseline/func/sub-s205_ses-baseline_task-facematching_dir-AP_bold.nii.gz'


I would just -B /project/oathes_analysis2/individual_projects/mydir to ensure Singularity exposes your data, and not remap your input and output directories. If your non-BIDS data is outside this directory, you may need to bind that directory, or a common parent directory.

That seems to be working!
I was definitely struggling with understanding how the binded paths worked, but just including the parent directory /project/oathes_analysis2/individual_projects is doing the trick.
Thanks!