Running fmriprep from within Docker universe

I am trying to run fmriprep on an HTCondor system, using the Docker container.

To submit the job, I specify that the universe = docker and that the docker_image is poldracklab/fmriprep:latest. This successfully pulls and then loads the docker image.

However, since I am effectively trying to run the script from “within” the Docker image (since it’s loaded as the universe), I can’t figure out how to go from:

docker run -ti --rm  -v filepath/to/data/dir:/data:ro  -v filepath/to/output/dir:/out \
       poldracklab/fmriprep:latest /data /out/out  participant

to a command that can be run without first invoking docker (since I’m already in it).

(fmriprep-docker /path/to/data/dir /path/to/output/dir participant doesn’t work because it too invokes docker first).

So: how does one go from the command invoking docker to a command run within the docker image?

Hello,

Within the docker image, you’ll just need to call:

fmriprep <arguments to fmriprep>

You can use the same command but omit the docker options. In your case, that’d be everything after poldracklab/fmriprep:<version>:

fmriprep /data /out/out participant