Simple Question: Accessing Windows Drive with Docker when trying to run Fmriprep - please help

I am remotely connecting to another Windows 10 computer.
I have seen this question asked elsewhere, but I never see an answer to it.

On the remote computer, I am trying to run a Linux based docker container on files in a drive that is NOT c. This data is large and I don’t have the space on my computer to move it to the c drive. It looks like the c drive is the only one that is mounted in WSL2.

Is there a simple way to mount another drive in WSL2 so that I can work on it within a Linux based docker container?

For example to run…

docker run -it --rm -v /f/location/file some_docker_image (in the example above it is Dcm2bids)

I need an option that is fairly simple as I am not that IT savy. From what I can tell, this is not possible?

Hi,

To clarify, is the container also located on the remote Windows machine? That is, is there anything on your local machine you need? On the remote server, what is the output of ls /?

Best,
Steven

Hi Steven,
Yes, I am running the container on a remote Window’s machine. I am not using my local machine for anything besides accessing the remote computer.

From a ubuntu command prompt on my remote windows desktop, I type “ls /”

I get the typical folders… “bin, boot, dev, etc, home” - is that what you are asking?

From window’s power shell, I get Directory: M:\

Hmm, I’m confused as to why the ubuntu command prompt and window’s powershell are giving different results. Again, for clarification, is the ubuntu command prompt on the remote machine or what you are using to connect your local machine to the remote machine? Related, are you SSHing from your terminal to Windows or using some kind of graphic interface remote desktop?

Sorry, I am totally confused as well :slight_smile: I think that I am just having trouble understanding how to get frmiprep to work within a windows based operating system. I would never normally do this by choice. Maybe we can start from the beginning.

  1. To connect to the remote machine, I am using a VPN and then a windows remote desktop connection (this is the way the university asked me get into the data).

  2. My local machine and my remote machine both have windows operating systems installed.

  3. I have some weird drive on my windows machine that holds my data f:/data

  4. How do I get fmriprep to see this file when running within docker?

In windows power shell, I try…

docker run nipreps/fmriprep -v f:\data …

I keep getting “path does not exist” - I’ve tried many different versions of this but seem to be getting the same error. I know this is probably a very simple solution, but I can’t seem to figure out what to do.

Okay, thank you for clarifying! For the rest of this answer, I will be referring to what you should do on your remote server, where the data are stored, unless otherwise stated.

Can you describe what you mean when you say you have a Ubuntu command prompt on the Window machine?

Do you have permission to install new terminals? I find that Cygwin is a great Unix-like terminal for Windows.

Can you also try -v f:/data (change to backslash)?

Best,
Steven

Thanks - I will look into downloading that terminal. I have to get temporary admin rights to install anything though.

Sorry, regarding the Ubuntu - I installed the ubuntu terminal for windows. Sorry if what I write next is completely wrong. My understanding is it mounts the windows directories into the mnt folder so that you can access them when trying to run linux stuff on windows. When I go into the mount directory I see “c” and “wsl” - directory “f” is not there. So, it’s not seeing this the directory I need to manipulate with fmriprep. If I could mount the directory here, then I probably wouldn’t need to try figuring out forward and backslash issues in window’s power shell. I hope this is a bit clearer? Probably not :frowning:

Regarding running in my window’s power shell, I get the same error that the path doesn’t exist when I type…

docker run fmripreps/fmriprep -v f:/data
… -v f://data
… -v f:\data
… -v f:\data

Try running sudo mount -t drvfs F: /mnt/f in WSL2.

I need to get admin privileges for that. Working on doing that and hopefull that should mount the drive, I assume?

thanks,

jen

Doubt it will work, but can you mount it without sudo?

That doesn’t work either.

I tried the following code in window’s powershell.

PS M:> docker run -it --rm --volume //f/Datastore/CMVM/scs/users/v1jsiege/Win7/Desktop/Scans/sourcedata/:/data:ro --volume //f/Datastore/CMVM/scs/users/v1jsiege/Win7/Desktop/Scans/test/:/out nipreps/fmriprep

I get the following response from docker -

docker:Error response from daemon: error while creating mount source path ‘/run/desktop/mnt/host/u/Datastore/CMVM/scs/users/v1jsiege/Win7/Desktop/Scans/sourcedata’: mkdir /run/desktop/mnt/host: permission denied.