How to use earlier version of fMRIPrep docker wrapper?

Hi, I’m wondering if it’s possible to revert back to using an earlier version of fMRIPrep. I was using 1.1.8 and it was working beautifully, but upgraded to 1.3.0.post2 recently (when I realized I needed to redo everything with freesurfer) and am getting a lot of different errors and crashes, beyond just the unsuppressed warnings. I’m under some time pressure to preprocess my data by an upcoming deadline and would like for the time being to go back to using the earlier version if possible. This is probably a simple Docker question but haven’t been able to effectively solve it via Google yet!

Below are the docker images I have currently. I used docker image rm 282dfe563f05 to delete the image for 1.3.0.post2, but when I tried to run fmriprep-docker afterwards it just pulled the image 'poldracklab/fmriprep:1.3.0.post2' again and downloaded everything.

$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
poldracklab/fmriprep 1.3.0.post2 282dfe563f05 7 days ago 12.8GB
miykael/nipype_tutorial latest 472830b32e1b 4 months ago 5.29GB
poldracklab/fmriprep 1.1.8 ac3a493f03a7 4 months ago 11.5GB
poldracklab/fmriprep latest ac3a493f03a7 4 months ago 11.5GB
poldracklab/mriqc latest 612647bc8607 6 months ago 7.63GB

Thank you!!

And of course, I figure it out a few minutes after I post…

I think can do it by invoking Docker directly (copy/pasted previous output from an earlier run), changing the poldracklab/fmriprep:1.1.8 section below to reflect which version I want to use:

$ docker run --rm -it -e DOCKER_VERSION_8395080871=18.09.1 -v /Users/sarenseeley/Desktop/restingstate/data/derivatives/freesurfer-license/license.txt:/opt/freesurfer/license.txt:ro -v /Users/sarenseeley/Desktop/restingstate/data:/data:ro -v /Users/sarenseeley/Desktop/restingstate/data/derivatives:/out -v /Users/sarenseeley/Desktop/restingstate/data/derivatives/scratch:/scratch poldracklab/fmriprep:1.1.8 /data /out participant --low-mem --stop-on-first-crash --longitudinal --use-syn-sdc --use-aroma --participant_label sub-101 -w /scratch

$ pip install fmriprep-docker==1.1.8

Fabulous, thank you @effigies!

For any other newb CLI users who might run into this problem… I initially got error: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/fmriprep_docker.py' when trying pip install fmriprep-docker==1.1.8.

As it says on the label, this is a permissions issue. Use login <yourusername> to switch users to one with admin privileges, then sudo pip install fmriprep-docker==1.1.8

@01010011 if you don’t have root access on the server you can try appending the --user flag to the pip command to install the package in you local home directory:

When I tried $ pip install fmriprep-docker==1.1.8 --user locally I got the following warning:

The script fmriprep-docker is installed in ‘/Users/rblair/.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.
If this doesn’t work you may need to setup a virtual environment using a program like conda or virtualenv

If you get this error you could try adding $HOME/.local/bin to your path variable, or call it directly with $ $HOME/.local/bin/fmriprep-docker

1 Like