Closed StephDocTUM closed 4 years ago
what version of fmriprep are you using? could you share the actual docker command generated after running the wrapper command?
yes sure:
docker run --rm -it -e DOCKER_VERSION_8395080871=19.03.8 -v /Users/neurolab/Desktop/Stephan/Programmes/freesurfer/license.txt:/opt/freesurfer/license.txt:ro -v /Users/neurolab/Desktop/NeuerOrdner:/data:ro -v /Users/neurolab/Desktop/NeuerOrdner/derivatives/participant:/out poldracklab/fmriprep:20.1.0 /data /out participant --participant-label 010001
fMRIPrep v20.1.0
An I am using: export PATH=$PATH:/Users/neurolab/.local/bin alias fmriprep-docker='/Users/neurolab/.local/bin/fmriprep-docker' in my ~/.zprofile
is it possible /Users/neurolab/Desktop/Stephan/Programmes/freesurfer/license.txt
does not exist?
No, I checked it. It does exist for sure.
This issue and https://neurostars.org/t/fmriprep-recon-all-finding-old-files-how-to-remove/6987 make me think we might have a bug with the config & the fs license setting.
hm, it is looking for the license in the correct location (/opt/freesurfer/license.txt
is where your local license is bound within the container), so I'm not immediate sure what's going on here.
Could you try checking the file within the container interactively?
To shell in, run the following command:
$ docker run --rm -it -e DOCKER_VERSION_8395080871=19.03.8 -v /Users/neurolab/Desktop/Stephan/Programmes/freesurfer/license.txt:/opt/freesurfer/license.txt:ro -v /Users/neurolab/Desktop/NeuerOrdner:/data:ro -v /Users/neurolab/Desktop/NeuerOrdner/derivatives/participant:/out --entrypoint=bash poldracklab/fmriprep:20.1.0
Once you're in, try:
$ cat /opt/freesurfer/license.txt
to verify the license looks correct. What version of freesurfer do you have installed locally?
FYI, you can use your normal fmriprep-docker
command and add --shell
at the end, and it will open a shell without running fMRIPrep.
Could you try with 20.1.1 when it becomes available? - it carries #2165 which might solve this issue.
@stephanwu89 the new release 20.1.1 just posted, could you give it a try?
Hello. I'm having a similar issue after updating to 20.1.1. I was originally using an earlier version of fmriprep (version 20.0.7), which ran without any issues. But after updating, and inputting the same command in the command prompt, it tells me that it cannot find the freesurfer license. In my case, nothing has changed other than the update. The license exists in the indicated location and I've also set up the file sharing in Docker. I would be most grateful for any help/updates on this issue!
RUNNING: docker run --rm -it -e DOCKER_VERSION_8395080871=19.03.8 -v /Users/Tanya Wen/Desktop/fMRI/freesurfer.txt:/opt/freesurfer/license.txt:ro -v C:\Users\Tanya Wen\Desktop\fMRI\decodCC.01_BIDS\Nifti:/data:ro -v C:\Users\Tanya Wen\Desktop\fMRI\decodCC.01_BIDS\Preprocessed:/out poldracklab/fmriprep:20.1.1 /data /out participant --participant-label 03 --dummy-scans 4 --skull-strip-t1w force
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
cc/ @mgxd
I did recon-all now separately from fmri_rep. Do first recon-all put the output in an appropriate folder and do fmri_prep afterwards.
@tanya-wen i suspect one your paths was broken by our latest change - could you try running:
docker run --rm -it -e DOCKER_VERSION_8395080871=19.03.8 -v C:\Users\Tanya Wen\Desktop\fMRI\freesurfer.txt:/opt/freesurfer/license.txt:ro -v C:\Users\Tanya Wen\Desktop\fMRI\decodCC.01_BIDS\Nifti:/data:ro -v C:\Users\Tanya Wen\Desktop\fMRI\decodCC.01_BIDS\Preprocessed:/out poldracklab/fmriprep:20.1.1 /data /out participant --participant-label 03 --dummy-scans 4 --skull-strip-t1w force
(this fixes the license path to be in line with your others)
Is it possible that the space in the user name is not being escaped?
IMO, I suspect its an interaction with Windows requiring specific drives to be shared via Docker and the bash representation of something located on the C:
drive. I think (hope) #2180 will fix this.
@mgxd, thank you for your quick reply. Your solution worked!!! Everything is back and running.
p.s., When using 20.0.7, I originally didn't have "C:/" in front of any of the paths (input directory, output directly, nor freeserfer licence) when using the fmriprep-docker rapper. But it seemed that it wasn't an issue back then. It just added it automatically.
HI, I also have this problem with the docker version of smriprep. I am running it on MAC (Catalina) and am using the following command (I replaced the absolute paths here since it is patient specific):
smriprep-docker path_BIDS path_out participant-label 01 fs-license-file $FREESURFER_HOME/license.txt
I get the following output:
RUNNING: docker run --rm -it -e DOCKER_VERSION_8395080871=19.03.8 -v path_to_license/license.txt:/opt/freesurfer/license.txt:ro -v path_BIDS:/data:ro -v /path_out:/out poldracklab/smriprep:0.6.1 /data /out participant --participant-label 01
Traceback (most recent call last):
File "/usr/local/miniconda/bin/smriprep", line 10, in --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 type: echo $FS_LICENSE I get the correct path to my license file, same for $FREESURFER_HOME/license.txt and I also tried to give the absolute path in the --fs-license-file (which also points to the correct file) I would very much appreciate your help :)
@sbrueningk can you try with:
smriprep-docker path_BIDS path_out participant-label 01 -e FS_LICENSE=/opt/freesurfer/license.txt --fs-license-file $FREESURFER_HOME/license.txt
This is assuming that your license file on the host is located at $FREESURFER_HOME/license.txt
Hello, thank you so much for the quick reply - unfortunately there is still an error: when I use exactly the command suggested I get: smriprep-docker: error: argument analysis_level: invalid choice: 'participant-label' (choose from 'participant')
so I added the '--' for participant label: smriprep-docker path_BIDS path_out --participant-label label -e FS_LICENSE=/opt/freesurfer/license.txt --fs-license-file $FREESURFER_HOME/license.txt
then I the the following error: smriprep-docker: error: argument -e/--env: expected 2 arguments
What else do I need to include as an argument? I would very much appreciate your help. All the best, Sarah
I may have propagated an error when copied your original command line:
smriprep-docker path_BIDS path_out participant --participant-label 01 -e FS_LICENSE=/opt/freesurfer/license.txt --fs-license-file $FREESURFER_HOME/license.txt
HI, I found the origin of my problem which was that my license file was located on my Desktop and I had to manually allow Docker to access files on the Desktop via System Preferences - Security and Privacy - Files and Folders - Docker - Desktop Folder I don't know why this setting was not activated in the first place, but once this had been changed the normal command: smriprep-docker path-BIDS path-out participant --fs-license-file path-license worked! Thank you all so much for your help!
I think this has been addressed. Please reopen if new problems emerge.
Hi,
I'm using fmriprep version 20.1.1 via a singularity container on a HPC system and am running the following command:
cd /fred/oz156 module load singularity/latest singularity run --cleanenv --bind /fred/oz156/ \ /fred/oz156/code/containers/fmriprep-20.1.1.simg \ /fred/oz156/BIDS_files_anonymised_nifti /fred/oz156/BIDS_subjects_fMRIprepoutput_2 \ participant \ --participant-label $1 --work-dir "/fred/oz156/BIDS_files_anonymised_nifti/" \ --fs-license-file "/fred/oz156/freesurfer_license.txt" \
and I'm getting the following error:
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
The path to my freesurfer license is correct. I was hoping to see if anyone has an idea of what may be happening?
Thankyou Simone
@oesteban could you please reopen this thread?
Try running singularity shell and ensure that the path is accessible.
Thank you - its all sorted now! Appreciate your help with this!
Please note that this was addressed in 20.1.2 (a later release) and that 20.2.0 LTS had just come out http://reproducibility.stanford.edu/fmriprep-lts/
Thank you - its all sorted now! Appreciate your help with this!
I have the same problem as you, how did you solve it?
Hi,
I am running the following command:
fmriprep-docker /Users/neurolab/Desktop/NeuerOrdner /Users/neurolab/Desktop/NeuerOrdner/derivatives/participant --participant-label 010001 --fs-license-file /Users/neurolab/Desktop/Stephan/Programmes/freesurfer/license.txt
and encounter the following error:
The path to my freesurfer license is correct and I do not understand why is putting /opt/ for all freesurfer Pathes?
Anyone an idea?