I’m running fmriprep in a singularity container and my computing nodes do not have internet access. Therefore, I’ve pre-downloaded the templates as suggested. However, even though I now have the templates already downloaded, fmriprep still tries to download the files and inevitably fails. Can someone please tell me what I’m doing wrong here? Thanks in advance!
Hi, I’m having the same issue as the original poster, could you expand on what you mean by running the commands inside the container? Sorry I don’t have much experience with bash or singularity
For reference, this is the code I’m running, which is failing because it tries to download templateflow rather than use what I have stored locally. I have the templates stored in the path specified in the TEMPLATEFLOW_DIR.
You should see your canary. If not, the bind is failing, probably due to system policy. I would try putting your templateflow directory somewhere like a scratch directory.
Hi, Thanks so much for the reply. Unfortunately, this did not solve the issue, as I can see my canary after following your exact code - screenshot below:
The fact that you see your canary doesn’t mean that you can actually write to that folder from within the container. I’d say you are having some permission issues with that folder.
Hi,
I don’t believe it turned out to be a permissions error. I’m posting the solution that worked for me below, in case it is ever of use to someone else.
First, I exported the same location as my previous code: export SINGULARITYENV_TEMPLATEFLOW_HOME=/home/fmriprep/.cache/templateflow
Then in singularity, I binded a /opt directory, instead of the /fmriprep/.cache directory
singularity run --cleanenv -B /home/tun47039/work/tads_bids/archive/templateflow:/opt/templateflow
[fmriprep & arguments]
Not sure why this worked, but it did. I’m Running singularity 3.7.3 and fmriprep 20.2.6.