Hi, I’m trying to install fmriprep according to following link. However, in the second step, I get the error in the below:
RuntimeError: ERROR: a valid license file is required for FreeSurfer to run. fMRIPrep looked for an existing license file at several paths, in this order: 1) command line argument --fs-license-file
; 2) $FS_LICENSE
environment variable; and 3) the $FREESURFER_HOME/license.txt
path. Get it (for free) by registering at https://surfer.nmr.mgh.harvard.edu/registration.html
When I command gedit $FREESURFER_HOME/license.txt
I see the license file with no problem. Can you help me with this problem? I saw that other people having same problems but their solutions did not helped me
Hi, can you share your whole command? This may be a docker issue, but it’s hard to tell without the specific invocation.
Also, just as a heads up to one of the more confusing bits of neuroimaging software: FSL is completely unrelated to FreeSurfer. FSL stands for FMRIB Software Library.
My bad! I corrected as Freesurfer.
I was just used fmriprep-docker to see how things work. But since I got this error, the process never goes further.
Ah, sorry, I wasn’t clear. I mean, could you show the full command-line, e.g.:
fmriprep-docker ARG1 ARG2 ...
fmriprep-docker /home/beyza/Documents/ds000238-download /home/beyza/Desktop --participant-label 01
This was the command I used. However, I saw we can specify FreeSurfer license like this
fmriprep-docker /home/beyza/Documents/ds000238-download /home/beyza/Desktop --participant-label 01 --fs-license-file $FREESURFER_HOME/license.txt
The second command worked. However, it is not clear for me why fmriprep says it did not found license file.
1 Like
fmriprep-docker
does not know to look in $FREESURFER_HOME/license.txt
without being told. If you have $FS_LICENSE
defined, we will detect that.
But as you can see in the first post, the output says the exact opposite
it says like it checked the $FREESURFER_HOME/license.txt
Right, we should distinguish between fMRIPrep and fmriprep-docker
. fMRIPrep is a tool that runs on a system that needs to have FreeSurfer installed, and therefore can be assumed to have FREESURFER_HOME
defined. fmriprep-docker
is a simple Python program that will translate an fMRIPrep command into a Docker command that runs the requested operation inside a Docker container. It does not require FreeSurfer to be installed.
So the error you’re seeing at the top is issued by fMRIPrep inside the container, not fmriprep-docker
, and it is not finding the license inside the container.
This difference isn’t really based on any principle; we added $FS_LICENSE
detection as a convenience to fmriprep-docker
, and the same could be done with $FREESURFER_HOME/license.txt
. If you would like to contribute this feature, please open an issue on the GitHub page, and we can help guide you through the process.
Best,
Chris
It’s all clear now, thank you for explanation.
I will open the issue now.