fmriPrep Freesurfer License issue

I run the singularity container with the following command…

singularity run --cleanenv ~/my_images/fmriprep-1.2.5.simg
/data2/users/jsmith/BIDS/bidsTest/ /data2/users/jsmith/fmriPrep/
participant --skip_bids_validation --fs-license-file /home/software/local/freesurfer/license.txt

When I list contents of /home/software/local/freesurfer, I can see the license… Yet when I run the singularity container it’s telling me that it’s missing. I’m at a loss

Hi ! Have you tried setting the license as an environmental variable ?



I tried but it pops out an error message saying it’s an invalid identifier

Could you provide the exact error message ? And just to confirm, you removed the --cleanenv flag when setting the environmental variable ?


1 Like

It also might be worth checking if the file is accessible from within the container:

singularity exec ~/my_images/fmriprep-1.2.5.simg ls -al /home/software/local/freesurfer/license.txt

If not you might need to mount directories with the -B singularity flag.

1 Like

I tried binding my $HOME directory (with the license file saved there) and it tells me $HOME is already bound… It goes on to tell me that it can’t find the license. When I echo $FS_LICENSE, it spits out the file path.

Side problem: uploading to gets caught on Step 3 (validation)…

I’m stuck unable to download fmriPrep and unable to upload to servers :frowning:

EDIT: It just took a really long time… And apparently I have errors

echo does not check existence of a file. You need to use ls (see above) or cat.

Same thing, when I ‘ls’ it spits out the same ‘/home/jsmith/license.txt’… Singularity is telling me my ‘/home/jsmith/’ directory is already bound

Thanks for the quick replies btw. Should have probably mentioned this before, I’m using CentOS 7

Just to be precise - ls inside the container (as oppose to the host)? In other words did you try singularity exec ~/my_images/fmriprep-1.2.5.simg ls -al /home/jsmith/license.txt?
Alterantively singularity exec ~/my_images/fmriprep-1.2.5.simg cat /home/jsmith/license.txt?

If so, did you try running via

singularity run --cleanenv ~/my_images/fmriprep-1.2.5.simg /data2/users/jsmith/BIDS/bidsTest/ /data2/users/jsmith/fmriPrep/ participant --skip_bids_validation --fs-license-file /home/jsmith/license.txt

(passing the absolute path to the license, muting host env variables)

I had a typo in my path, copy and pasting yours fixed it -.-

Thanks for the help!!!

If anyone is running into this problem and can’t figure it out… My typo was continuing the command line on to a new line using " \ "… Apparently it doesn’t work in CentOS 7. I got it to work by typing it all on one really long line

1 Like