Nipype, dockerhub, and singularity

Perhaps I am being bit lazy, but I am having some difficulty running the nipype docker image using singularity.

In other instances, I have been able to use dockerhub hosted images (e.g. pangeo ) simply with a command like this:

singularity exec docker://[docker_repo]:tag ./runScript

After initially downloading the image and building the container, the script runs and, on successive runs, the local cache version of this image is used.

Is this not the intended use case for the nipype dockerimage? Are there variants of this image that do work in this fashion?

As it stands, initial attempts at running a script are returning a “ModuleNotFoundError: No module named ‘nipype’” error, and help(“modules”) does not indicate that nipype is installed by default in the image.

Much of the documentation that I have seen discussing nipype container instances focuses on the building of containers (e.g. neurodocker), but my ideal use case would bypass the local management of container images.

Is there a way to use a nipype container image in this (admittedly lazy) fashion?

1 Like

Hi,

The python that has nipype installed is in (relative to the container): /opt/miniconda-latest/envs/neuro/bin/python . The default python (base minicoda) will not have the modules installed.

So you can do something like singularity exec -e nipype.img /opt/miniconda-latest/envs/neuro/bin/python $YOUR_SCRIPT.py $ARGS

This was with the most recent docker//nipype/nipype:latest

Best,
Steven

1 Like