ciftify icon indicating copy to clipboard operation
ciftify copied to clipboard

freesurfer license not found

Open StephDocTUM opened this issue 3 years ago • 5 comments

docker run -ti --rm
-v /Users/neurolab/Desktop/Pipeline_test3/:/data:ro
-v /Users/neurolab/Desktop/Pipeline_test4:/out
tigrlab/fmriprep_ciftify:latest /data /out participant --participant_label 1 --fs-license /Users/neurolab/Desktop/license.txt

tells me "Input /Users/neurolab/Desktop/license.txt, does not exist, or you do not have permission to read it." But it does exist and I have the permission to read it. What can I do?

Is there also a dockerfile for only ciftify? I only saw one for the combination of ciftify and fmriprep, but I need to further process my data after finishing fmriprep and before running fmri_ciftify.

Cheers

StephDocTUM avatar Jul 05 '21 12:07 StephDocTUM

You need to mount the freesurfer license into the docker as well

docker run -ti --rm
-v /Users/neurolab/Desktop/Pipeline_test3/:/data:ro
-v /Users/neurolab/Desktop/Pipeline_test4:/out
-v /Users/neurolab/Desktop/license.txt:/fs_licence.txt
tigrlab/fmriprep_ciftify:latest /data /out participant --participant_label 1 --fs-license fs_license.txt

You can tell ciftify to --read-from-derivatives and point the data to a folder other than fmriprep - as long as the outputs match fmriprep's naming conventions.

You could also use docker with the --entrypoint to try to use other commands in the ciftify docker

edickie avatar Jul 06 '21 04:07 edickie

It is still the same.

StephDocTUM avatar Jul 12 '21 16:07 StephDocTUM

Sorry may need a slash before fs license

docker run -ti --rm
-v /Users/neurolab/Desktop/Pipeline_test3/:/data:ro
-v /Users/neurolab/Desktop/Pipeline_test4:/out
-v /Users/neurolab/Desktop/license.txt:/fs_licence.txt
tigrlab/fmriprep_ciftify:latest /data /out participant --participant_label 1 --fs-license /fs_license.txt

edickie avatar Jul 12 '21 19:07 edickie

mhh it still comes up the same error.

I would need the fmriprep version 20.2.1 but an older ciftify version because the command cortexLeft.agg_data() does not work in the latest ciftify version? Or which versions of fmriprep and ciftify are installed when I use tigrlab/fmriprep_ciftify:latest? So something like FROM tigrlab/fmriprep_ciftify:20.2.1-2.3.2 tigrlab/fmriprep_ciftify does not use the latest fmriprep version,

StephDocTUM avatar Jul 14 '21 11:07 StephDocTUM

Okay, I changed the the fmriprep version in the Dockerfile here https://github.com/edickie/ciftify/blob/421f87d59bd08775e846847fceb8e8430ea81bc8/ciftify/bidsapp/Dockerfile to FROM nipreps/fmriprep:20.2.1 Now it works.

The following line is executed in python over my dockercontainter: subprocess.run(['ciftify_recon_all', '--verbose', '--resample-to-T1w32k', '--ciftify-work-dir', str(ciftify_work_dir), '--fs-subjects-dir', str(path_freesurfer), str(subject)]) The problem I am having now is that ciftify_recon_all does gives out /sub-1 freesurfer folder does not exist, exiting. Although the path exists and is used before.

Is the version of ciftify which is installed in here https://github.com/edickie/ciftify/blob/421f87d59bd08775e846847fceb8e8430ea81bc8/ciftify/bidsapp/Dockerfile a version which uses other commands to tell ciftify_recon_all where to find the processed freesurfer data?

# setting up an install of ciftify (manual version) inside the container ADD https://api.github.com/repos/edickie/ciftify/git/refs/heads/master version.json RUN mkdir /home/code && git clone -b master https://github.com/edickie/ciftify.git /home/code/ciftify

This command subprocess.run(['ciftify_recon_all', '--verbose', '--resample-to-T1w32k', '--ciftify-work-dir', str(ciftify_work_dir), '--fs-subjects-dir', str(path_freesurfer), str(subject)]) works fine if I run it directly in the terminal.

StephDocTUM avatar Jul 20 '21 11:07 StephDocTUM