MICA-MNI / micapipe

micapipe from the Multimodal imaging and connectome analysis lab (http://mica-mni.github.io) at the Montreal Neurological Institute. Read The Docs documentation below
http://micapipe.readthedocs.io
GNU General Public License v3.0
80 stars 27 forks source link

Running micapipe after docker pull #96

Closed LPNC-LANG closed 9 months ago

LPNC-LANG commented 10 months ago

Hi,

Thanks for this awesome multimodal pipeline ! I'm having trouble running micapipe (windows11). I can access the help menu but the micapipe command is not recognized (i have to provide the docker image manually) and despite having followed the instructions on the doc, i'm always getting error messages such as:


Some packages in this Docker container are non-free If you are considering commercial use of this container, please consult the relevant license: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Licence INFO: /root/matlab/startup.m does not exist ... creating

[ ERROR ]..... was not found on the BIDS directory Check ls /


Has anyone got similar issues ? I know I'm probably doing something wrong but can't figure it out Thanks for your help

LPNC-LANG commented 10 months ago

I think the issue may have to do with realpath which does not recognize the directories although they exist

realpath: : No such file or directory realpath: : No such file or directory

rcruces commented 10 months ago

Hello, it look like the docker container is running but the paths you are providing to your BIDs dataset might be not correct. Can you please share here the full command you are using?

LPNC-LANG commented 10 months ago

micapipe -bids /mnt/d/raw_data -out /mnt/d/raw_data/derivatives -fs_licence $HOME/freesurfer/license.txt -sub CC110037 -proc_structural -proc_dwi -SC -tracts 10

realpath: /mnt/d/raw_data/derivatives: No such file or directory realpath: /mnt/d/raw_data: No such file or directory

[ ERROR ]..... CC110037 was not found on the BIDS directory Check ls /sub-CC110037


I double checked the paths exist and the raw_data dataset has been BIDS validated online

ZhyGao commented 10 months ago

Have you settle the issue? I meet the same problem as yours. Thanks.

rcruces commented 10 months ago

If you are running docker this might be a permission issue. In order to Docker to run you must be sure that your bids and out directories have the correct permissions for others:

-bids: must have permissions to read, and execute

chmod go+xXr -R ${bids}

-out: must have permissions to read, write and execute

chmod go+xXrw -R ${out}

-tmp: must have permissions to read, write and execute

chmod go+xXrw -R ${tmp}

As well as your licence should have read permissions for others.

Below you can see the docker command that should work after you verified that the permissions are correct.

# Running docker
bids=/mnt/d/raw_data
out=/mnt/d/raw_data/derivatives
fs_lic=$HOME/freesurfer/license.txt
tmp=/tmp
sub=CC110037

docker run -ti --rm \
    -v ${bids}:/bids \
    -v ${out}:/out \
    -v ${tmp}:/tmp \
    -v ${fs_lic}:/opt/licence.txt \
    micalab/micapipe:v0.2.2 -bids /bids -out /out -fs_licence /opt/licence.txt \
    -sub $sub  \
    -proc_structural -proc_surf -post_structural -proc_dwi  -regSynth -SC -tracts 10M -SC
done

for -proc_dwi, you might have to define two more variables if the pipeline does not find the dwi acquisitions automatically:

-dwi_main            : Full path to DWI with N number of directions and b0. If used, it will overwrite the defaults.
                        Default = <bids>/<subject>/dwi/*_dir-AP_dwi.nii*
 -dwi_rpe             : DWI b0 image(s) with phase reversal encoding. If used, it will overwrite the defaults.
                        Default = <bids>/<subject>/dwi/<sub>_dir-PA_dwi.nii*
                        Set to 'FALSE' if no DWI with reverse fase encoding will be provided
ZhyGao commented 10 months ago

chmod go+xXrw -R ${tmp}

Thanks for your reply. I tried as your code. But issue still exist. Here's my code. `# Running docker bids=/data/gzy/micapipe/MICs_release/rawdata out=/data/gzy/micapipe/MICs_release/rawdata/derivatives fs_lic=/data/gzy/micapipe/license.txt tmp=/tmp sub=HC001

chmod go+xXr -R ${bids} chmod go+xXrw -R ${out} chmod go+xXrw -R ${tmp}

docker run -ti --rm \ -v ${bids}:/bids \ -v ${out}:/out \ -v ${tmp}:/tmp \ -v ${fs_lic}:/opt/licence.txt \ micalab/micapipe:v0.2.2 -bids /bids -out /out -fs_licence /opt/licence.txt \ -sub $sub \ -proc_structural -proc_surf -post_structural -proc_dwi -regSynth -SC -tracts 10M -SC`

I am sure that the ses-01 is in the sub-HC001 file. But I get the error to check ls /bids/sub-HC001. 1693727289752

ZhyGao commented 10 months ago

chmod go+xXrw -R ${tmp}

Thanks for your reply. I tried as your code. But issue still exist. Here's my code. `# Running docker bids=/data/gzy/micapipe/MICs_release/rawdata out=/data/gzy/micapipe/MICs_release/rawdata/derivatives fs_lic=/data/gzy/micapipe/license.txt tmp=/tmp sub=HC001

chmod go+xXr -R ${bids} chmod go+xXrw -R ${out} chmod go+xXrw -R ${tmp}

docker run -ti --rm -v ${bids}:/bids -v ${out}:/out -v ${tmp}:/tmp -v ${fs_lic}:/opt/licence.txt micalab/micapipe:v0.2.2 -bids /bids -out /out -fs_licence /opt/licence.txt -sub $sub -proc_structural -proc_surf -post_structural -proc_dwi -regSynth -SC -tracts 10M -SC`

I am sure that the ses-01 is in the sub-HC001 file. But I get the error to check ls /bids/sub-HC001. 1693727289752 `bids=/mica/rawdata/ out=/mica/derivatives/ sub=HC001 ses=ses-01 echo "${bids}" chmod go+xXr -R ${bids} chmod go+xXrw -R ${out} chmod go+xXrw -R ${tmp}

docker run -ti --rm \ -v ${bids}:/bids \ -v ${out}:/out \ micalab/micapipe:v0.2.2 -bids /bids -out /out\ -sub $sub -ses $ses\ -proc_structural -proc_surf -post_structural -proc_dwi -regSynth -SC -tracts 10M -SC ` I read the original code in micapipe and utilities,but I'm still confused that I have the error about the path.

ZhyGao commented 10 months ago

1693734543714

rcruces commented 10 months ago

What do you get when you type ls $bids? It looks like your path is not correct

ZhyGao commented 10 months ago

What do you get when you type ls $bids? It looks like your path is not correct

When I type ls ${bids}, I get the file list in ${bids}. So that is very confused. `bids=/mica/rawdata/ out=/mica/derivatives/ sub=HC001 ses=ses-01 echo "${bids}" ls ${bids} chmod go+xXr -R ${bids} chmod go+xXr -R ${out} chmod go+xXr -R ${tmp}

docker run -ti --rm \ -v ${bids}:/bids \ -v ${out}:/out \ micalab/micapipe:v0.2.2 -bids /bids -out /out\ -sub $sub -ses $ses\ -proc_structural -proc_surf -post_structural -proc_dwi -regSynth -SC -tracts 10M -SC`

And here the results and the error. 1693794234701

LPNC-LANG commented 10 months ago

Did you settle the issue yet ?

ZhyGao commented 10 months ago

Did you settle the issue yet ?

Sorry,no.How about you

rcruces commented 10 months ago

It looks like chmod is trowing an error. from the top directory /mica if you type ls -lsRh sub-HC001. Your permissions should be something like -rwxrwxr-x for all the files for docker to read them. The other option is to build a singularity container from the docker.

Also if you are using symbolic links the pipeline will not find the the real path, you must provide the real path.

ClementGuichet commented 10 months ago

For some reason it's now working using cygwin terminal

rcruces commented 9 months ago

It's a permission issue. Currently we don't have full support for windows users because we don't have that OS to test the pipeline. In my opinion if you find out how to change the permissions in windows or use singularity the pipeline should run. We highly recommend you to run this pipeline on a linux based HPC cluster, workstation or virtual environment.