Fmriprep no bueno on mac silicon

Summary of what happened:

Like many before me, fmriprep-docker runs for eons on mac silicon without any completion. Given that mac silicon is now the most common environment for people analyzing fmri, would it be possible to either update the installation instructions or produce a docker image that is compatible with mac silicon? At the moment the recommended way to run the software is to run a linux container on mac silicon. My apologies if I have missed something.

Command used (and if a helper script was used, a link to the helper script or the command generated):

fmriprep-docker ~/PROJECTS/fus/data/bold ~/PROJECTS/fus/data/fmriprep_out participant -w ~/PROJECTS/fus/data/fmriprep_working --fs-license-file ~/license.txt


Environment (Docker, Singularity / Apptainer, custom installation):

Data formatted according to a validatable standard? Please provide the output of the validator:


Relevant log outputs (up to 20 lines):


Screenshots / relevant information:

1 Like

Contributions are welcome. I don’t have access to Mac ARM hardware, and I don’t have a sense of the scale of the effort required. I would probably start by trying to install “bare-metal” installation:

git clone
cd fmriprep
mamba create env -f env.yml
mamba activate fmriprep
mamba env config vars set -n fmriprep FSLDIR=$CONDA_PREFIX

You will also need FreeSurfer, AFNI, Convert3d and Connectome Workbench.

If that works well, then we’d need someone to figure out how to package this into a Docker image or similar.

Thank you Chris, bare metal is what I have been trying. It is running, but seems to be having a hard time getting through the recon-all’s.

I am not expert enough with docker to take this on, but I imagine that someone will eventually figure it out.

Having said that, I would strongly advocate to re-invent fmriprep in a purely Python tensor-based environment. FreeSurfer and AFNI are nice tools and all, but they are geriatric at this point and all of their functions could be written to run on GPUs.

If recon-all is the problem, then it is likely a problem with FreeSurfer’s build for ARM64. We cannot do anything about that. In an upcoming release of fMRIPrep, you will be able to pass in a FreeSurfer directory without us attempting to check and resume, so you could drop in a FastSurfer reconstruction.

Someone has recently posted a preprint with a DeepPrep tool that attempts to do exactly that.