Closed alienx-zero closed 4 years ago
Local paths won't be visible within the docker container unless you specifically include them, such as using the -v
flag.
To make the docker process easier, we package a docker wrapper, more information can be found at https://fmriprep.org/en/stable/docker.html#running-fmriprep-with-the-fmriprep-docker-wrapper
To be clear, it looks like what you want is:
fmriprep-docker E:\OPT\research\fMRI\2475376 E:\OPT\research\fMRI\output participant --participnat-label 2475376 --fs-license-file E:\OPT\research\fMRI\license.txt
You will almost certainly want to add a -w
argument to use a work directory outside the container.
Sorry, I try either -v or -w, the license.txt path could not be recognized
Is the fmriprep-docker command not working for you? It was written to help avoid spending a lot of time debugging docker invocations. I see there was something that got at least to the validation stage above...
validation stage error is that after I remove the line --fs-license-file E:\OPT\research\fMRI\license.txt, it would report such error~ If I direclty run fmriprep-docker(F-D) in cmd, theywill say that F-D is not recognized as command as following:
C:\Users\99488>fmriprep-docker -w E:\OPT\research\fMRI\2475376 -w E:\OPT\research\fMRI\output participant --participnat-label 2475376 --fs-license-file E:\OPT\research\fMRI\license.txt 'fmriprep-docker' is not recognized as an internal or external command, operable program or batch file.
Should I add some file paths into enviroment variables? I do not know whether it work for docker
If I run it by docker run poldracklab/fmriprep instead of run --rm -it, it will report other error...
C:\Users\99488>docker run poldracklab/fmriprep -w E:\OPT\research\fMRI\2475376 -w E:\OPT\research\fMRI\output participant --participnat-label 2475376 --fs-license-file E:\OPT\research\fMRI\license.txt
You are using fMRIPrep-20.1.1, and a newer version of fMRIPrep is available: 20.1.2.
Please check out our documentation about how and when to upgrade:
https://fmriprep.readthedocs.io/en/latest/faq.html#upgrading
usage: fmriprep [-h] [--version] [--skip_bids_validation]
[--participant-label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]]
[-t TASK_ID] [--echo-idx ECHO_IDX] [--bids-filter-file FILE]
[--anat-derivatives PATH] [--nprocs NPROCS]
[--omp-nthreads OMP_NTHREADS] [--mem MEMORY_GB] [--low-mem]
[--use-plugin FILE] [--anat-only] [--boilerplate_only]
[--md-only-boilerplate] [--error-on-aroma-warnings] [-v]
[--ignore {fieldmaps,slicetiming,sbref} [{fieldmaps,slicetiming,sbref} ...]]
[--longitudinal]
[--output-spaces [OUTPUT_SPACES [OUTPUT_SPACES ...]]]
[--bold2t1w-init {register,header}] [--bold2t1w-dof {6,9,12}]
[--force-bbr] [--force-no-bbr] [--medial-surface-nan]
[--dummy-scans DUMMY_SCANS] [--random-seed RANDOM_SEED]
[--use-aroma]
[--aroma-melodic-dimensionality AROMA_MELODIC_DIM]
[--return-all-components]
[--fd-spike-threshold REGRESSORS_FD_TH]
[--dvars-spike-threshold REGRESSORS_DVARS_TH]
[--skull-strip-template SKULL_STRIP_TEMPLATE]
[--skull-strip-fixed-seed]
[--skull-strip-t1w {auto,skip,force}] [--fmap-bspline]
[--fmap-no-demean] [--use-syn-sdc] [--force-syn]
[--fs-license-file FILE] [--fs-subjects-dir PATH]
[--no-submm-recon] [--cifti-output [{91k,170k}] |
--fs-no-reconall] [-w WORK_DIR] [--clean-workdir]
[--resource-monitor] [--reports-only] [--run-uuid RUN_UUID]
[--write-graph] [--stop-on-first-crash] [--notrack] [--sloppy]
bids_dir output_dir {participant}
fmriprep: error: Path does not exist:
Sorry, the text miss the next word on last commnet. I show it in this figure .
Do you have Python installed? If so, python -m pip install fmriprep-docker
.
The issue is that you need to mount any paths, and all Docker options go before the image.
docker run -v E:\OPT\research\fMRI\2475376:/data -v E:\OPT\research\fMRI\output:/out -v E:\OPT\research\fMRI\license.txt:/opt/freesurfer/license.txt poldracklab/fmriprep:latest /data /out participant --participant-label 2475376
omg, it is fixed~ Thx very much. Like u
Sorry to take your time again... Here is a new problem.. And the data structure is shown as following: These data are dowloaded from http://fcon_1000.projects.nitrc.org/indi/pro/eNKI_RS_TRT/NKI_Rockland_nifti_dl.html shown in the tutorials. Is it completed? Or lack the labels info
That's not a BIDS dataset, so fMRIPrep won't know what to do with it. You will either need to reorganize it into BIDS or find someone who has already done that. I might check on Neurostars.
Get~Thanks for your patient explanation~
Do you have Python installed? If so,
python -m pip install fmriprep-docker
.The issue is that you need to mount any paths, and all Docker options go before the image.
docker run -v E:\OPT\research\fMRI\2475376:/data -v E:\OPT\research\fMRI\output:/out -v E:\OPT\research\fMRI\license.txt:/opt/freesurfer/license.txt poldracklab/fmriprep:latest /data /out participant --participant-label 2475376
I have the same question but I don't know why. Can you help me?
docker run -v /home/gzy/tvb-collab-master/input:/data -v /home/gzy/tvb-collab-master/output:/out -v /data/freesurfer/license.txt:/opt/freesurfer/license.txt nipreps/fmriprep:latest /data /out participant --participant-label CON03
there's an 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
Thanks for your reply
Hi, I am new to start fmriprep and also first time using docker. Anyone could tell me what is the problem. I think the path is right... C:\Users\99488>docker run poldracklab/fmriprep E:\OPT\research\fMRI\2475376 E:\OPT\research\fMRI\output {participant} --participant-label 2475376 --fs-license-file E:\OPT\research\fMRI\license.txt You are using fMRIPrep-20.1.1, and a newer version of fMRIPrep is available: 20.1.2. Please check out our documentation about how and when to upgrade: https://fmriprep.readthedocs.io/en/latest/faq.html#upgrading usage: fmriprep [-h] [--version] [--skip_bids_validation] [--participant-label PARTICIPANT_LABEL [PARTICIPANT_LABEL ...]] [-t TASK_ID] [--echo-idx ECHO_IDX] [--bids-filter-file FILE] [--anat-derivatives PATH] [--nprocs NPROCS] [--omp-nthreads OMP_NTHREADS] [--mem MEMORY_GB] [--low-mem] [--use-plugin FILE] [--anat-only] [--boilerplate_only] [--md-only-boilerplate] [--error-on-aroma-warnings] [-v] [--ignore {fieldmaps,slicetiming,sbref} [{fieldmaps,slicetiming,sbref} ...]] [--longitudinal] [--output-spaces [OUTPUT_SPACES [OUTPUT_SPACES ...]]] [--bold2t1w-init {register,header}] [--bold2t1w-dof {6,9,12}] [--force-bbr] [--force-no-bbr] [--medial-surface-nan] [--dummy-scans DUMMY_SCANS] [--random-seed RANDOM_SEED] [--use-aroma] [--aroma-melodic-dimensionality AROMA_MELODIC_DIM] [--return-all-components] [--fd-spike-threshold REGRESSORS_FD_TH] [--dvars-spike-threshold REGRESSORS_DVARS_TH] [--skull-strip-template SKULL_STRIP_TEMPLATE] [--skull-strip-fixed-seed] [--skull-strip-t1w {auto,skip,force}] [--fmap-bspline] [--fmap-no-demean] [--use-syn-sdc] [--force-syn] [--fs-license-file FILE] [--fs-subjects-dir PATH] [--no-submm-recon] [--cifti-output [{91k,170k}] | --fs-no-reconall] [-w WORK_DIR] [--clean-workdir] [--resource-monitor] [--reports-only] [--run-uuid RUN_UUID] [--write-graph] [--stop-on-first-crash] [--notrack] [--sloppy] bids_dir output_dir {participant} fmriprep: error: Path does not exist: <E:\OPT\research\fMRI\2475376>.