fMRIPrep-docker command

Hi there,

I am having a similar issue. I installed docker, followed the tutorial on how to run fmriprep and everything seems fine until I try to run:
$fmriprep-docker /Users/franklinfeingold/Desktop/BIDS_NKI_walkthrough/Nifti /Users/franklinfeingold/Desktop/BIDS_NKI_walkthrough/derivatives participant --participant-label 2475376 --fs-license-file /Users/franklinfeingold/freesurfer.txt --ignore slicetiming

I get “command not found”. I dug around the previous posts here and I suspect I have to set up my “environment” but not sure what that entails.

Hi @jd-lobo

Welcome to NeuroStars and raising this question! From your call it appears that you are using my paths. May you please try using your paths that have your raw imaging data and where to place the derivatives (likely at the same level where I placed mine). I also had the FreeSurfer license file near a top level of my computer that would need to be changed too.

Here is what I actually entered: 36%20PM

02%20PM

Thank you for sharing your command line inputs! This appears to be a sourcing issue. If you may check inside of /Users/juju/.local/bin fmriprep-docker should be there and calling it from there should allow fMRIPrep to be found and able to run

Thank you franklin, I looked through the folder in search of the fMRIPrep-docker.py with no luck. Running the installation script doesn’t seem to help. Perhaps I am missing another step?

Hi @jd-lobo, the problem appears to be that you have a Python environment whose bin directory isn’t in your PATH. Can you try:

find ~/.local -name fmriprep-docker

If that doesn’t exist, then you probably just have a bad installation. Try:

pip uninstall fmriprep-docker
pip install --upgrade --user -v fmriprep-docker

Near the end, you should see something like:

Installing collected packages: fmriprep-docker

  changing mode of /anaconda3/bin/fmriprep-docker to 755

The path prior to fmriprep-docker will be a path you need to add to your PATH environment variable. For example, it looks like you’re using bash, so if you had the same result as above, you should add to your ~/.bashrc:

export PATH="/anaconda3/bin:$PATH"

If you had /Users/juju/.local/bin/fmriprep-docker, then you would add:

export PATH="/Users/juju/.local/bin:$PATH"
1 Like

Hi there - I was having similar issues as @jd-lobo and we are actually operating from the same server at the same university. I was able to add the path to my path environment variable, which solved the “command cannot be found” issue, but instead I got the following message:

NPuccetti@departure:~$ fmriprep-docker /deep/heller/work/Healthyu /deep/heller/work/Healthyu/sub-5002 participant --participant-label 5002 --fs-license-file /usr/local/freesurfer/6.0.0/license.txt --ignore slicetiming
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.38/images/json?filters=%7B%22reference%22%3A%7B%22poldracklab%2Ffmriprep%3A1.4.1%22%3Atrue%7D%7D: dial unix /var/run/docker.sock: connect: permission denied
Downloading. This may take a while…
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.38/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
See ‘docker run --help’.
Could not detect memory capacity of Docker container.
Do you have permission to run docker?

I emailed our IT guy, as it make be about permissions on the server but I also wanted to check in here to see if neurostars had an idea?

Thanks,

Nikki

Yes, this looks like a permissions issue with regard to Docker. In shared environments, it can be worth looking into Singularity, as that tends to be more to system administrators’ liking.

Thank you! Got it to run with 1 subject but now I seem to have bumped into a memory issue. I’ll start a new thread.

Hi there,

I tried to install fMRIprep in a new computer via docker. I ran the installation and received this message:
#starts here
Creating /Users/jlobo/Library/Python/2.7/bin

changing mode of /Users/jlobo/Library/Python/2.7/bin/fmriprep-docker to 755

The script fmriprep-docker is installed in ‘/Users/jlobo/Library/Python/2.7/bin’ which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Successfully installed fmriprep-docker-1.5.9

Cleaning up…

Removed build tracker ‘/private/var/folders/yh/tzh739bx4v98w332_56qcjpdt3by0w/T/pip-req-tracker-N_OAUy’

You are using pip version 18.1, however version 20.0.2 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command
#ends here

How can I fix the path?

Hi, I’ve got similar problem. And I’m very fresh to both fmriprep & docker. I’ve downloaded Docker, followed the tutorial and instruction (downloaded latest image and fmriprep) and when I try to run code with that syntax it says fmriprep-docker: command not found.

find ~/.local -name fmriprep-docker

gives

/Users/user/.local/bin/fmriprep-docker

so I’m not sure where’s the problem. When I uninstalled and reinstalled there was only one warning:

WARNING: The script fmriprep-docker is installed in ‘/Users/sztuka/.local/bin’ which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

But I’m not sure what does it mean.

The problem is that your PATH environment variable does not include $HOME/.local/bin. You can add it in your .bashrc (or equivalent):

PATH="$PATH:$HOME/.local/bin"

Thank you it worked!

Hi,

I’m having a similar issue. I installed fmriprep via docker and when I typed
find ~/.local -name fmriprep-docker, I received the following: /Users/myname/./Library/Python/2.7/bin/fmriprep-docker

It looks like it installed using my Mac’s version of python 2.7, but I have 3.8 downloaded and would like to use fmriprep via 3.8.

I’m not sure how to modify my path or re-install fmriprep so that I can use it in this way.

Thanks!

There should be no advantage or disadvantage to using fmriprep-docker through Python 2.7 vs 3.8. To remove it with Python 2.7, use python2 -m pip uninstall fmriprep-docker. You can then install with Python 3 as: python3 -m pip install fmriprep-docker.

If you’re not already using Anaconda to manage your Python environment, I would highly recommend it.

Hello,
Thanks to everyone for this thread! I am also very new to fMRI prep, and I’ve been getting a similar error.

When I run:
fmriprep-docker /Volumes/Pegasus_tsussman/data/GESTE/fMRI_data /Volumes/Pegasus_tsussman/data/GESTE/GESTE_fMRI_Prep_Output participant --participant-label GESTE_1005_77599664329_noExposureData --fs-license-file /Applications/freesurfer6/freesurfer/license.txt

I get:
fmriprep: Could not find docker command… Is it installed?

When I try:
find ~/.local -name fmriprep-docker

I get:
/Users/posnerlab/.local/bin/fmriprep-docker

When I try: echo $PATH

I get:
/Users/posnerlab/opt/anaconda3/bin:/Users/posnerlab/opt/anaconda3/condabin:/opt/local/bin:/opt/local/sbin:/Applications/freesurfer6/freesurfer/bin:/Applications/freesurfer6/freesurfer/fsfast/bin:/Applications/freesurfer6/freesurfer/tktools:/usr/local/fsl/bin:/Applications/freesurfer6/freesurfer/mni/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/posnerlab/.local/lib/python3.7/site-packages/python3.7:/Users/posnerlab/.local/bin/fmriprep-docker:/opt/X11/bin:/Users/posnerlab/abin:/Applications/MRIcroGL:/Applications/MATLAB_R2016a.app/bin:/Applications/MRIcron:/Users/posnerlab/.local/bin

I see fmri-prep in the list of paths. Did I still not handle the path correctly? Is there something else that I mishandled? Thank you so much in advance for your help!

Do you have Docker installed?

MANAGED BY INCF