fMRiprep on Windows machine using Neurodesktop App

Summary of what happened:

Hello everyone,
I am trying to run fMRIprep using Neurodesktop App on my Windows workstation. I am using the following script, but it throwing me an error. It seems like the problem stems from accessibility to the freesurfer, but I am not sure.
Could someone help?

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


#User inputs:
mem=20 #gb


#Convert virtual memory from gb to mb
mem=`echo "${mem//[!0-9]/}"` #remove gb at end
mem_mb=`echo $(((mem*1000)-5000))` #reduce some memory for buffer space during pre-processing

export FS_LICENSE=/home/jovyan/neurodesktop-storage/license.txt

#Run fmriprep
  fmriprep $bids_root_dir/nifti $bids_root_dir/derivatives \
    participant \
    --participant-label $subj \
    --skip-bids-validation \
    --md-only-boilerplate \
    --fs-license-file /home/jovyan/neurodesktop-storage/license.txt \
    --output-spaces T1w MNI152NLin2009cAsym:res-2 \
    --nthreads $nthreads \
    --stop-on-first-crash \
    --mem_mb $mem_mb \


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

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


Relevant log outputs (up to 20 lines):

240327-22:47:09,224 nipype.workflow IMPORTANT:
	 Building fMRIPrep's workflow:
           * BIDS dataset path: /home/jovyan/neurodesktop-storage/fmri_classifier/nifti.
           * Participant list: ['001'].
           * Run identifier: 20240327-224506_970c0e0b-cb48-4857-84fe-a37d4c67d06a.
           * Output spaces: T1w MNI152NLin2009cAsym:res-2.
           * Pre-run FreeSurfer's SUBJECTS_DIR: /home/jovyan/neurodesktop-storage/fmri_classifier/derivatives/sourcedata/freesurfer.
Process Process-2:
Traceback (most recent call last):
  File "/opt/conda/lib/python3.9/multiprocessing/", line 315, in _bootstrap
  File "/opt/conda/lib/python3.9/multiprocessing/", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/lib/python3.9/site-packages/fmriprep/cli/", line 115, in build_workflow
    retval["workflow"] = init_fmriprep_wf()
  File "/opt/conda/lib/python3.9/site-packages/fmriprep/workflows/", line 92, in init_fmriprep_wf
    single_subject_wf = init_single_subject_wf(subject_id)
  File "/opt/conda/lib/python3.9/site-packages/fmriprep/workflows/", line 306, in init_single_subject_wf
    anat_preproc_wf = init_anat_preproc_wf(
  File "/opt/conda/lib/python3.9/site-packages/smriprep/workflows/", line 533, in init_anat_preproc_wf
    surface_recon_wf = init_surface_recon_wf(
  File "/opt/conda/lib/python3.9/site-packages/smriprep/workflows/", line 233, in init_surface_recon_wf
    RobustRegister(auto_sens=True, est_int_scale=True), name="fsnative2t1w_xfm"
  File "/opt/conda/lib/python3.9/site-packages/nipype/interfaces/freesurfer/", line 134, in __init__
    self.inputs.subjects_dir = self._subjects_dir
  File "/opt/conda/lib/python3.9/site-packages/nipype/interfaces/base/", line 135, in validate
    self.error(objekt, name, str(value))
  File "/opt/conda/lib/python3.9/site-packages/traits/", line 74, in error
    raise TraitError(
traits.trait_errors.TraitError: The 'subjects_dir' trait of a RobustRegisterInputSpec instance must be a pathlike object or string representing an existing directory, but a value of '/home/jovyan/freesurfer-subjects-dir' <class 'str'> was specified.

Screenshots / relevant information:

Hi @VinodhKumar,

In the future, please use the Software Support post category which provides a post template for you to give us important information. You can see I added it in for you here, but there’s still some info missing you provide by editing your post.

In regards to your problem:

Try upgrading to most recent version (23.2.1 at this time).

You say you’re using docker, but the lack of docker preamble suggests you are running in a bare-metal python installation. Unless is there something about Neurodesktop I am missing?

Are the data BIDS validated? Can you tell us the BIDS validation report?

Can you manually specify a freesurfer subjects dir that you know exists with the --fs-subjects-dir argument?