When running through Docker, I highly recommend using fmriprep-docker, which will take care of mounting the file for you. However, to directly use Docker, you’ll need to mount your license file into your container before fmriprep will have access to it.
Traceback (most recent call last):
File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py", line 51, in run_node
result['result'] = node.run(updatehash=updatehash)
File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 407, in run
self._run_interface()
File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 517, in _run_interface
self._result = self._run_command(execute)
File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py", line 650, in _run_command
result = self._interface.run()
File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base.py", line 1088, in run
runtime = self._run_interface(runtime)
File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base.py", line 1658, in _run_interface
self.raise_exception(runtime)
File "/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base.py", line 1604, in raise_exception
**runtime.dictcopy()))
RuntimeError: Command:
recon-all -autorecon1 -i /root/src/fmriprep/work/fmriprep_wf/single_subject_01_wf/anat_preproc_wf/anat_template_wf/t1_reorient/sub-01_run-01_T1w_ras.nii.gz -noskullstrip -openmp 3 -subjid sub-01 -sd /out/out/freesurfer
Standard output:
Subject Stamp: freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.1-f53a55a
Current Stamp: freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.1-f53a55a
INFO: SUBJECTS_DIR is /out/out/freesurfer
Actual FREESURFER_HOME /opt/freesurfer
Linux e86541303ba0 4.9.49-moby #1 SMP Wed Sep 27 23:17:17 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
'/opt/freesurfer/bin/recon-all' -> '/out/out/freesurfer/sub-01/scripts/recon-all.local-copy'
/out/out/freesurfer/sub-01
mri_convert /root/src/fmriprep/work/fmriprep_wf/single_subject_01_wf/anat_preproc_wf/anat_template_wf/t1_reorient/sub-01_run-01_T1w_ras.nii.gz /out/out/freesurfer/sub-01/mri/orig/001.mgz
mri_convert.bin /root/src/fmriprep/work/fmriprep_wf/single_subject_01_wf/anat_preproc_wf/anat_template_wf/t1_reorient/sub-01_run-01_T1w_ras.nii.gz /out/out/freesurfer/sub-01/mri/orig/001.mgz
$Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 mreuter Exp $
reading from /root/src/fmriprep/work/fmriprep_wf/single_subject_01_wf/anat_preproc_wf/anat_template_wf/t1_reorient/sub-01_run-01_T1w_ras.nii.gz...
--------------------------------------------------------------------------
GNU libc version: 2.23
ERROR: Systems running GNU glibc version greater than 2.15
require a newly formatted license file (it's free). Please
download a new one from the following page:
http://surfer.nmr.mgh.harvard.edu/registration.html
--------------------------------------------------------------------------
Linux e86541303ba0 4.9.49-moby #1 SMP Wed Sep 27 23:17:17 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
recon-all -s sub-01 exited with ERRORS at Mon Nov 20 22:13:39 UTC 2017
For more details, see the log file /out/out/freesurfer/sub-01/scripts/recon-all.log
To report a problem, see http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
Standard error:
Return code: 1
The same error occurs for sub-02. If you have any idea what might be going on it would be much appreciated!
I had, but I’m realizing now that I downloaded a Mac license, rather than Linux. That might be the problem. Re-running fmriprep now and I’ll let you know if that solves the error!
I’m getting an error using fMRI_prep in a singularity container. I keep getting the error:
ERROR: a valid license file is required for FreeSurfer to run.
Even when I include the --fs-license-file with a full path to the license.
PYTHONPATH="" singularity exec /exports/fsw/mrgiffin/poldracklab_fmriprep_latest-2018-02-23-faf5170f3072.img head -n 2 /exports/fsw/mrgiffin/license.txt
head: cannot open ‘/exports/fsw/mrgiffin/license.txt’ for reading: No such file or directory
The latter of which is strange, because the license.txt file is certainly in that directory. Thanks for your help!
In singularity no all paths from the host system are accessible inside the container. Which ones are depends on the configuration of singularity (performed by the administrator). Depending on the configuration you might be able to make some folder accessible as a user via command line arguments (more info here: http://singularity.lbl.gov/docs-mount).
However the quickest solution would be to put the license file inside a folder that you know is already accessible such as $HOME or /exports/fsw/mrgiffin/UG/BIDS.
Great, thanks. Copying the license file to $HOME worked (it finds the license now, I’m getting another error but at least that problem is solved), turns out it was a problem of path accessibility. Thanks again.
I’m getting a similar error, and I’ve downloaded (and re-loaded) a freesurfer license (but that didn’t solve the issue). Here’s the command I’m running.
Traceback (most recent call last):
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/plugins/multiproc.py”, line 62, in run_node
result[‘result’] = node.run(updatehash=updatehash)
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py”, line 441, in run
result = self._run_interface(execute=True)
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py”, line 518, in _run_interface
return self._run_command(execute)
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/pipeline/engine/nodes.py”, line 594, in _run_command
result = self._interface.run()
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/freesurfer/base.py”, line 268, in run
return super(FSCommandOpenMP, self).run(**inputs)
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/freesurfer/base.py”, line 144, in run
return super(FSCommand, self).run(**inputs)
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base/core.py”, line 485, in run
runtime = self._run_interface(runtime)
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base/core.py”, line 973, in _run_interface
self.raise_exception(runtime)
File “/usr/local/miniconda/lib/python3.6/site-packages/niworkflows/nipype/interfaces/base/core.py”, line 912, in raise_exception
**runtime.dictcopy()))
RuntimeError: Command:
mri_robust_template --satit --fixtp --mov /data/sub-NDARAY461TZZ/anat/sub-NDARAY461TZZ_acq-VNav_T1w.nii.gz /data/sub-NDARAY461TZZ/anat/sub-NDARAY461TZZ_acq-VNavNorm_T1w.nii.gz --inittp 1 --iscale --noit --template sub-NDARAY461TZZ_acq-VNav_T1w_template.nii.gz --subsample 200 --lta /home/jamielh/Volumes/Hanson/NKI_HealthyBrainNetwork/CBIC/R3/derivatives/working/fmriprep_wf/single_subject_NDARAY461TZZ_wf/anat_preproc_wf/anat_template_wf/t1_merge/tp1.lta /home/jamielh/Volumes/Hanson/NKI_HealthyBrainNetwork/CBIC/R3/derivatives/working/fmriprep_wf/single_subject_NDARAY461TZZ_wf/anat_preproc_wf/anat_template_wf/t1_merge/tp2.lta
Standard output:
$Id: mri_robust_template.cpp,v 1.54 2016/05/05 21:17:08 mreuter Exp $
–satit: Will estimate SAT iteratively!
–fixtp: Will map everything to init TP!
–mov: Using /data/sub-NDARAY461TZZ/anat/sub-NDARAY461TZZ_acq-VNav_T1w.nii.gz as movable/source volume.
–mov: Using /data/sub-NDARAY461TZZ/anat/sub-NDARAY461TZZ_acq-VNavNorm_T1w.nii.gz as movable/source volume.
Total: 2 input volumes
–inittp: Using TP 1 as target for initialization
–iscale: Enableing intensity scaling!
–noit: Will output only first template (no iterations)!
–template: Using sub-NDARAY461TZZ_acq-VNav_T1w_template.nii.gz as template output volume.
–subsample: Will subsample if size is larger than 200 on all axes!
–lta: Will output LTA transforms
Setting iscale …
reading source ‘/data/sub-NDARAY461TZZ/anat/sub-NDARAY461TZZ_acq-VNav_T1w.nii.gz’…
GNU libc version: 2.23
ERROR: Systems running GNU glibc version greater than 2.15
require a newly formatted license file (it’s free). Please
download a new one from the following page: http://surfer.nmr.mgh.harvard.edu/registration.html
Standard error:
Return code: 255
180507-14:17:56,677 workflow INFO:
[Node] Finished “fmriprep_wf.single_subject_NDARAY461TZZ_wf.func_preproc_task_rest_run_2_wf.bold_hmc_wf.mcflirt”.
180507-14:17:59,178 workflow INFO:
[Node] Setting-up “fmriprep_wf.single_subject_NDARAY461TZZ_wf.func_preproc_task_rest_run_1_wf.bold_hmc_wf.fsl2itk” in “/home/jamielh/Volumes/Hanson/NKI_HealthyBrainNetwork/CBIC/R3/derivatives/working/fmriprep_wf/single_subject_NDARAY461TZZ_wf/func_preproc_task_rest_run_1_wf/bold_hmc_wf/fsl2itk”.
180507-14:17:59,363 workflow INFO:
[Node] Running “fsl2itk” (“fmriprep.interfaces.itk.MCFLIRT2ITK”)
180507-14:18:51,155 workflow INFO:
[Node] Finished “fmriprep_wf.single_subject_NDARAY461TZZ_wf.func_preproc_task_rest_run_1_wf.bold_hmc_wf.fsl2itk”.
180507-14:18:53,386 workflow INFO:
[Node] Setting-up “fmriprep_wf.single_subject_NDARAY461TZZ_wf.func_preproc_task_rest_run_1_wf.bold_bold_trans_wf.bold_transform” in “/home/jamielh/Volumes/Hanson/NKI_HealthyBrainNetwork/CBIC/R3/derivatives/working/fmriprep_wf/single_subject_NDARAY461TZZ_wf/func_preproc_task_rest_run_1_wf/bold_bold_trans_wf/bold_transform”.
180507-14:18:53,544 workflow INFO:
[Node] Running “bold_transform” (“fmriprep.interfaces.itk.MultiApplyTransforms”)
Perfect, that solved it. Interestingly, I think that initial syntax (without license.txt) worked in some iterations of things. (but I added the full path and all’s well).
I just wanted to add my own experience with the license issue. Using this method mentioned in the installation instructions circumvented the license issue but resulted in fmriprep not finding my participants or scans:
Not sure if this should be addressed in the documentation or it resulted from some error on my part. The moment I set the FS_License environment variable rather than enabling it when using fmriprep-docker, fmriprep was once again able to find my participants and scans.
…
Ah, Looking at the RUNNING: command I now realize the issue. I figured I had missed something. However, it appears that I hadn’t completely solved my license issue by setting a new path, as I’ve now replaced the initial ‘RuntimeError: ERROR: when --no-freesurfer is not set, a valid license file is required for FreeSurfer to run’ with a new license error that doesn’t pop up for some time:
‘GNU libc version: 2.23
ERROR: Systems running GNU glibc version greater than 2.15
require a newly formatted license file (it’s free). Please
download a new one from the following page: http://surfer.nmr.mgh.harvard.edu/registration.html’
Not sure why I am getting this one.