Mrgrid cannot access / open .nii.gz

i’m trying to run the mrgrid function via a docker container.

docker run --rm -it mrtrix3 mrgrid ..\Nifti\sub-01\anat\sub-01_acq-TR2_T1w.nii.gz crop -as ..\Nifti\sub-01\anat\sub-01_acq-TR5_T1w.nii.gz ..\Nifti\sub-01\anat\sub-01_acq-TR2-FOVchange.nii.gz

I’m certain that the specified paths are correct. However, i receive:

mrgrid: [ERROR] cannot access file "..\Nifti\sub-01\anat\sub-01_acq-TR2_T1w.nii.gz": No such file or directory
mrgrid: [ERROR] error opening image "..\Nifti\sub-01\anat\sub-01_acq-TR2_T1w.nii.gz"

Thankful for any ideas how i might solve this issue.

I confess to having very little experience with docker, but given that it’s effectively running a Linux environment, I’d expect files paths to be specified using the Unix convention, i.e. with a forward slash (/) as the folder/directory delimiter – not the DOS/Windows backslash (\). Have you tried modifying the filename to use forward slashes?

I think you need to mount the host filesystem:

thanks for your reply.
I bind mounted the folders (+subdirs) i’m trying to access via the settings/resources/filesharing option. Doing it manually from the terminal didn’t change the result either.
Apart from that, i ensured that the current win user has full access (read / write) to the folders, but the error remains. Sidenote: when running e.g. fmriprep from the docker, i can successfully acces the target files.

yes i gave it a go but unfortunately it didn’t resolve the issue!

eventually: specifying the name of the container in the command did the trick:
docker run --rm -it -v my/path:/base mrtrix3/mrtrix3:latest mrgrid /base/Nifti/sub-01/anat/sub-01_acq-TR2_T1w.nii.gz crop -as /base/Nifti/sub-01/anat/sub-01_acq-TR5_T1w.nii.gz /base//Nifti/sub-01/anat/sub-01_acq-TR2-FOVchange.nii.gz