Error passing Freesurfer license to DeepPrep (Singularity and Docker)

Summary of what happened:

I am trying to run DeepPrep and getting the same error in both Docker and Singularity. In both cases, DeepPrep says “ERROR: No Input --fs_license_file :”

The license file is new (generated 2 days ago) and has been used to successfully run fMRIprep in both Singularity and Docker.

In the case of the Docker command, I have confirmed that (a) the license file is being bound correctly and the contents are readable from inside the container and (b) the environment variable FSLICENSE is being set correctly. I have also tried without explicitly setting the FSLICENSE variable (I haven’t needed to do this with other tools), and the result is the same (error saying I haven’t provided a license file.)

Has anyone else encountered this issue with DeepPrep?

Command used (and if a helper script was used, a link to the helper script or the command generated):

Singularity command:

singularity run --cleanenv --nv \
	-B /home/john/Documents/license.txt:/opt/freesurfer/license.txt:ro \
	-B /home/john/Documents/repos/biling_segregation/data/mri/bids_test_20250110_1_session/bids:/input:ro \
	-B /home/john/Documents/repos/biling_segregation/data/mri/bids_test_20250110_1_session/derivatives/deepprep:/output \
	/home/john/deepprep_24.1.2.sif /input /output participant \
	--bold_task_type rest \
	--fs-license-file /opt/freesurfer/license.txt \
	--device gpu

Docker command:

docker run --rm -it --gpus all \
	-e FSLICENSE=/opt/freesurfer/license.txt \
	-v /home/john/Documents/license.txt:/opt/freesurfer/license.txt:ro \
	-v /home/john/Documents/repos/biling_segregation/data/mri/bids_test_20250110_1_session/bids:/input:ro \
	-v /home/john/Documents/repos/biling_segregation/data/mri/bids_test_20250110_1_session/derivatives/deepprep:/output \
	pbfslab/deepprep:24.1.2 /input /output participant \
	--bold_task_type rest \
	--fs-license-file /opt/freesurfer/license.txt \
	--cpus 24

Version:

DeepPrep version 24.1.2

Environment (Docker, Singularity / Apptainer, custom installation):

I have tried using both Singularity and Docker.

Data formatted according to a validatable standard? Please provide the output of the validator:

PASTE VALIDATOR OUTPUT HERE

Relevant log outputs (up to 20 lines):

INFO: args: /input /output participant --bold_task_type rest --fs-license-file /opt/freesurfer/license.txt --device gpu
INFO: existed nextflow WorkDir: /output/WorkDir/nextflow
INFO: run_config : /output/WorkDir/nextflow/run.config
ERROR: No Input --fs_license_file : 

Hi @tylercall,

Perhaps try binding it to /fs_license.txt like they do in the documentation (Usage Notes (Local) — DeepPrep documentation).

Best,
Steven

@Steven your suggestion. worked. Thanks! I hadn’t realized the name of the license file had to be fs_license.txt.

Working command:

docker run --rm -it --gpus all \
	-v /home/john/Documents/license_tyler.txt:/fs_license.txt:ro \
	-v /home/john/Documents/repos/biling_segregation/data/mri/bids_test_20250110_1_session/bids:/input:ro \
	-v /home/john/Documents/repos/biling_segregation/data/mri/bids_test_20250110_1_session/derivatives/deepprep:/output \
	pbfslab/deepprep:24.1.2 /input /output participant \
	--fs_license_file /fs_license.txt \
	--bold_task_type rest \
	--cpus 24
1 Like