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

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?

Can you post the full command line you are trying?

Does the following command work?

docker pull poldracklab/fmriprep:1.3.2

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?

What about?

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

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.

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

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?

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.

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!

I have also noticed that if you increase your disk image size (Docker desktop dropdown --> Preferences–> Resources -->Advanced --> Disk Image Size [slider]) this will also solve the problem. In many cases we are running large jobs which take up a good portion of the pre-allocated disk size per-image, but you can also just increase this and avoid this issue!