Cannot connect to the Docker daemon for fmriprep-docker even though docker is connected

docker
fmriprep
#1

Hi All,

I am having trouble simply running fmriprep-docker. I successfully installed fmriprep-docker as well as docker. Docker is running just fine based on

docker run hello-world

But fmriprep-docker does not read docker, giving me the below error.

Cannot connect to the Docker daemon at tcp://localhost:2375. Is the docker daemon running?
Downloading. This may take a while…
docker: Cannot connect to the Docker daemon at tcp://localhost:2375. Is the docker daemon running?.
See ‘docker run --help’.
Could not detect memory capacity of Docker container.
Do you have permission to run docker?

Does anyone have any idea?

#2

Can you post the full command line you are trying?

Does the following command work?

docker pull poldracklab/fmriprep:1.3.2
#3

That line works:

1.3.2: Pulling from poldracklab/fmriprep
Digest: sha256:d13b8218735538d519055ec6e67cb19d1b2cc7406e0e0020464b28473d3d380a
Status: Downloaded newer image for poldracklab/fmriprep:1.3.2

I tried:

fmriprep-docker -h

This gives:
Cannot connect to the Docker daemon at tcp://localhost:2375. Is the docker daemon running?
usage: fmriprep-docker [-h] [–version] [-i IMG] [-w WORK_DIR]
[–output-grid-reference OUTPUT_GRID_REFERENCE]
[–template-resampling-grid TEMPLATE_RESAMPLING_GRID]
[–fs-license-file PATH] [–use-plugin PATH] [-f PATH]
[-n PATH] [-p PATH] [–shell] [–config PATH]
[-e ENV_VAR value] [-u USER]
[bids_dir] [output_dir] [{participant}]


Image ‘poldracklab/fmriprep:1.3.2’ is missing
Would you like to download? [Y/n] y
Downloading. This may take a while…
docker: Cannot connect to the Docker daemon at tcp://localhost:2375. Is the docker daemon running?.
See ‘docker run --help’.
Could not detect memory capacity of Docker container.
Do you have permission to run docker?

#4

What about?

sudo fmriprep-docker -i poldracklab/fmriprep:1.3.2 --help
#5

Strangely, sudo command does not take fmriprep-docker.

sudo: fmriprep-docker: command not found

I checked whether the directory file for fmriprep-docker is on my PATH and it is.

#6

Hi @amyrmkm

Perhaps may not be the sudo, but the fmriprep-docker command. By chance when checking paths it could be something with environments. May you please try following this? Another thought is that fmriprep-docker has not been downloaded (rather pulled fmriprep directly) so it would make sense that the command is not found. The linked post comment is using pip vs docker to get the fmriprep-docker tool

#7

Could you post the output of docker info? It seems that your docker installation requires root privileges to run.

does docker run --rm -it poldracklab/fmriprep:1.3.2 --version work? If not, does sudo docker run --rm -it poldracklab/fmriprep:1.3.2 --version?

#8

running this

find ~/.local -name fmriprep-docker

gives

/home/amyrmkm/.local/bin/fmriprep-docker

But, I think the problem is actually running docker in Ubuntu on Windows 10. There seems to be not a stable connection between Ubuntu and docker.

#9

Please see the above answer. I was not able to run it with -it in Ubuntu on Windows 10. Someone suggested to use Anaconda, and it actually worked. Thanks for helping me out though!