I used -v docker pull nipreps/fmriprep: \ and it worked but when I run this code:
I get this error:
Do I need to change something about this code and if so, would you know what that should be?
I really do appreciate your time in helping me out
I used -v docker pull nipreps/fmriprep: \ and it worked but when I run this code:
I get this error:
Do I need to change something about this code and if so, would you know what that should be?
I really do appreciate your time in helping me out
-v
is used to mount a volume to Docker. So if you want Docker to be able to use a drive, you mount it with -v
, similar to -B
in Singularity if you have used that before. -v
is not used to specify command arguments. So you should bind all the drives you need to docker, then specify the fmriprep arguments as normal. Have you read this documentation?
Right, it worked to mount a volume in Docker.
However, now Iâm struggling with this code:
I get this error:
Any suggestions?
Try to put the --fslicense-file argument before participant.
Also, shouldnât your paths start with a â/â : /home/rubina/derivatives for example?
ok sorry for the misleading suggestion.
I found this ressource:
https://reproducibility.stanford.edu/fmriprep-tutorial-running-the-docker-image/
If you follow their exemple, you could try (but this is exactly what was suggesting @effigies earlier, you may have tried it already):
fmriprep-docker /home/rubina/BIDS /home/rubina/derivatives participant --participant-label C0120061 --fs-license-file /home/rubina/derivatives/freesurfer/license.txt --low-mem
Just eyeballing it, it looks like the arguments are starting with some unicode dash instead of an ASCII dash.
Yes, because when I use the normal - it doesnât work.
Yes, I tried that code (without /derivatives/freesurfer) but I get the same error:
(with and even without sub)Python isnât going to recognize unicode dashes.
Iâm using Ubuntu, not Python.
Apologies for being unclear. fMRIPrep is written in Python. If you pass it arguments that it cannot understand, it will not work.
Iâm seeing some things confused here, so at the risk of over-explaining, let me lay out the design:
fmriprep <INPUT> <OUTPUT> participant <FLAGS>
.docker run --rm -it <MOUNTS> nipreps/fmriprep:<version> <INPUT> <OUTPUT> participant <FLAGS>
. The mounts are of the form -v <OUTSIDE>:<INSIDE>
and may require changes to the location of INPUT/OUTPUT and some FLAGS.fmriprep-docker
provides an interface that will convert from fmriprep-docker <INPUT> <OUTPUT> participant <FLAGS>
to an adjusted docker run --rm -it <MOUNTS> nipreps/fmriprep:<version> <INPUT> <OUTPUT> participant <FLAGS>
that allows you to act as if youâre running fMRIPrep directly. So you SHOULD NOT manually add -v
flags. fmriprep-docker
will attempt to pass them to fmriprep
, not Docker.@effigies, thank you so much for such a thorough explanation as to how fMRIPrep works
However, I removed -v flags (in my earlier posts) and put the code in one line but cannot figure out what Iâm missing in my code atm.
Can you copy-paste the full command and outputs? Screenshots are very difficult to work with.
My apologies. Thank you for your help.
Here is my code:
fmriprep-docker /home/rubina/BIDS/ /home/rubina/derivatives participant â âparticipantâlabel subâC0120061 â âfsâlicenseâfile /home/rubina/fs-license/license.txt â âlowâmem
The output is as follows:
Warning: <8GB of RAM is available within your Docker environment.
Some parts of fMRIPrep may fail to complete.
Continue anyway? [y/N]y
RUNNING: docker run --rm -e DOCKER_VERSION_8395080871=20.10.7 -it -v /home/rubina/BIDS/sub-C0120061:/data:ro -v /home/rubina/derivatives:/out nipreps/fmriprep:20.2.2 /data /out participant ââparticipantâlabel sub-C0120061 ââfsâlicenseâfile /home/rubina/fs-license/license.txt ââlowâmem
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] [âbids-database-dir PATH]
[ânprocs NPROCS] [âomp-nthreads OMP_NTHREADS]
[âmem MEMORY_MB] [âlow-mem] [âuse-plugin FILE]
[âanat-only] [âboilerplate_only] [âmd-only-boilerplate]
[âerror-on-aroma-warnings] [-v]
[âignore {fieldmaps,slicetiming,sbref,t2w,flair} [{fieldmaps,slicetiming,sbref,t2w,flair} âŚ]]
[â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] [âoutput-layout {bids,legacy}]
[-w WORK_DIR] [âclean-workdir] [âresource-monitor]
[âreports-only] [âconfig-file FILE] [âwrite-graph]
[âstop-on-first-crash] [ânotrack]
[âdebug {compcor,all} [{compcor,all} âŚ]] [âsloppy]
bids_dir output_dir {participant}
fmriprep: error: unrecognized arguments: â âparticipantâlabel sub-C0120061 â âfsâlicenseâfile /home/rubina/fs-license/license.txt â âlowâmem
fMRIPrep: Please report errors to Issues ¡ nipreps/fmriprep ¡ GitHub
Here the dashes and spaces are definitely going to cause problems. Can you try copy-pasting the following?
fmriprep-docker /home/rubina/BIDS/ /home/rubina/derivatives participant --participant-label C0120061 --fs-license-file /home/rubina/fs-license/license.txt --low-mem
As suggested, I tried the code:
fmriprep-docker /home/rubina/BIDS/ /home/rubina/derivatives participant --participant-label C0120061 --fs-license-file /home/rubina/fs-license/license.txt --low-mem
I get this error message:
usage: fmriprep-docker [-h] [âversion] [-i IMG] [-w WORK_DIR] [âoutput-spaces [OUTPUT_SPACES [OUTPUT_SPACES âŚ]]]
[âfs-license-file PATH] [âfs-subjects-dir PATH] [âconfig-file PATH]
[âanat-derivatives PATH] [âuse-plugin PATH] [âbids-database-dir PATH]
[âpatch PACKAGE=PATH [PACKAGE=PATH âŚ]] [âshell] [âconfig PATH] [-e ENV_VAR value]
[-u USER] [ânetwork NETWORK] [âno-tty]
[bids_dir] [output_dir] [{participant}]
fmriprep-docker: error: Path should point to a file (or symlink of file): </home/rubina/fs-license/license.txt>.
Does this file exist, if you type ls /home/rubina/fs-license/license.txt
?
It does exists but when I type that command it says:
rubina@DESKTOP-QRBPHG4:~$ ls /home/rubina/fs-license/license.txt
ls: cannot access â/home/rubina/fs-license/license.txtâ: No such file or directory
It seems it does not exist there, at any rate. Whatâs its location in Windows?
MANAGED BY INCF