New reply on an old post… Did you ever resolve the “unknown image format” issue from last summer? I’m brand new to fmriprep and have run into the exact same problem on my HPC. In looking through the comments it seems like you never got a satisfactory answer. Thanks!
Thanks, Dan. This is very helpful. There was definitely an issue with setting up the singularity, which I believe I resolved with your code as I was able to build it successfully. However, I also got the warning “Building container as an unprivileged user. If you run this container as a root it may be missing some functionality”. Not sure if that will matter…
Would you mind briefly explaining what “export SINGULARITYENV_TEMPLATEFLOW_HOME=/N/dcwan/projects/irf/templateflow” is doing. It also looks like you are explicitly binding the singularity, can you also help me understand what you have in those 2 paths?
I’m obviously new to fmriprep and greatly appreciate the assistance!!
I’ve also had those warnings when installing containers. I believe it has to do with us not having root access on our HPCs, but regardless, it doesn’t affect anything, so fmriprep should work just fine.
Yes, so I forgot to mention templateflow, which is used with the newer versions of fmriprep. Essentially, it’s a repository of different templates that you can use to normalize your data to in the --output-spaces option.
To install templateflow, simply do:
pip install templateflow --user
which should place a templateflow directory in $HOME/.cache. However, I had an issue installing it here (see this post), but my solution worked and there aren’t any issues with templateflow.
The command export SINGULARITYENV_TEMPLATEFLOW_HOME is signifying where my templateflow directory is, so that it can be used by the fmriprep singularity container. You’ll notice in my example that one of my output spaces is MNI152NLin6Asym:res-2, which comes from templateflow (res-2 means I’m requesting the template with 2mm resolution).
Finally, the line unset PYTHONPATH; singularity run -B /N/dcwan/projects/irf/templateflow:/opt/templateflow /N/dcwan/projects/irf/containers/fmriprep-1.5.0.simg contains the paths to my templateflow and fmriprep singularity container. The rest is some miscellaneous stuff to get fmriprep started.