C-PAC run error, no crash log, no errors, only reports missing expected outputs

Summary of what happened:

I’m attempting to run C-PAC on a validated BIDS formatted dataset, containing only minimal data (1x of T1w, bold, sbref, and blip up/down).

I’ve tried it with the default pipeline (that is, specifying no pipeline) and a slightly modified “minimal” version of that with some extra options turned off. In both cases - C-PAC goes through intial stages and the long nipype.workflow INFO process, and reaches this point and stops

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

I used the following command:

cpac --platform singularity -v \
-B /home/naxos2-raid34/logan-data/NeurInsight/outputs:/outputs \
run /home/naxos2-raid34/logan-data/NeurInsight/bids_HCP25/ /home/naxos2-raid34/logan-data/NeurInsight/outputs participant \
--pipeline_file /home/naxos2-raid34/logan-data/NeurInsight/cpac/pipeline_config_minimal.yml

Version:

1.8.6

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

I’m using python 3.10 with cpac version 1.8.6 in a singularity container.

> cpac version
Loading \U0001f433 Docker
Loading \u24c8 Singularity
singularity pull --name /home/naxos2-raid34/logan-data/NeurInsight/c-pac:latest.sif docker://fcpindi/c-pac:latest
FATAL:   Image file already exists: "/home/naxos2-raid34/logan-data/NeurInsight/c-pac:latest.sif" - will not overwrite
FATAL:   Image file already exists: "/home/naxos2-raid34/logan-data/NeurInsight/c-pac:latest.sif" - will not overwrite
/home/naxos2-raid34/logan-data/NeurInsight/c-pac:latest.sif
Loading \u24c8 /home/naxos2-raid34/logan-data/NeurInsight/c-pac:latest.sif as "logan (3978)" with these directory bindings:
  local                                       Singularity                                 mode
  ------------------------------------------  ------------------------------------------  ------
  /etc/passwd                                 /etc/passwd                                 ro
  /home/stone-ext4/logan/.cpac                /home/stone-ext4/logan/.cpac                rw
  /home/naxos2-raid34/logan-data/NeurInsight  /home/naxos2-raid34/logan-data/NeurInsight  rw
  /home/naxos2-raid34/logan-                  /home/naxos2-raid34/logan-                  rw
  data/NeurInsight/log                        data/NeurInsight/log
  /home/naxos2-raid34/logan-                  /home/naxos2-raid34/logan-                  rw
  data/NeurInsight/working                    data/NeurInsight/working
  /home/naxos2-raid34/logan-                  /home/naxos2-raid34/logan-                  rw
  data/NeurInsight/outputs                    data/NeurInsight/outputs
Logging messages will refer to the Singularity paths.

cpac (convenience wrapper) version 1.8.6
C-PAC version v1.8.6.dev1 running on Singularity version 1.2.5-1.el7

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

(thanks for edits - hopefully this is what you meant…)

Relevant log outputs (up to 20 lines):

[...]
240227-15:53:46,402 nipype.workflow INFO:
	 Connecting network_centrality...
240227-15:53:49,518 nipype.workflow INFO:
	 Workflow cpac_sub-100307_ses-ses01 settings: ['check', 'execution', 'logging', 'monitoring']
240227-15:53:49,804 nipype.workflow INFO:


Error of subject workflow cpac_sub-100307_ses-ses01

CPAC run error:

    Pipeline configuration: cpac-default-pipeline-NeurInsight
    Subject workflow: cpac_sub-100307_ses-ses01
    Elapsed run time (minutes): 0.10266321897506714
    Timing information saved in /home/naxos2-raid34/logan-data/NeurInsight/outputs/log/cpac_individual_timing_cpac-default-pipeline-NeurInsight.csv
    System time of start:      2024-02-27 15:53:47
    Missing expected outputs:
anat:
- sub-100307*_ses-ses01*_desc-brain*_T1w*
- sub-100307*_ses-ses01*_desc-brain*_mask*
- sub-100307*_ses-ses01*_desc-head*_T1w*
[...]

What follows after this is a further list of the expected outputs it is missing - which of course it is, it never ran any part of the workflow. Concludes with this

- sub-100307*_ses-ses01*_space-T1w*_sbref*

Missing outputs have been logged in /home/naxos2-raid34/logan-data/NeurInsight/outputs/log/pipeline_cpac-default-pipeline-NeurInsight/sub-100307_ses-ses01/sub-100307_ses-ses01_missingOutputs.yml
Tip: Look for "crash-*.txt" files in the log directory
for more information. Usually the chronological first 
crash file is the most informative.                  

It then goes to the next subject and does this again. No crash file is generated, and log files only show config options, etc - nothing useful. Turning on debugging (in pipeline file) does not help - reaches same point and produces the same output there.

The only difference if I use the default pipelines is that the list of missing expected outputs is much longer.

Screenshots / relevant information:


The bids dataset consist of symlinks to files that are located one directory up - these directories are bound when the singularity container starts up.

Is there an obvious mistake I am making? I will say that if I use --pipeline_config anat-only C-PAC will actually start processing things, but fails to find the FSLDIR, despite its location being set in my terminal (and of course being within the container) - so I know what it is kind of suppose to look like when active. Feels like I have missed something essential and simple but I’m at a loss.

Thanks!

Hi, thank you for reaching out! It looks like your data isn’t being loaded properly. Could you send the beginning of the run log, up until the python packages list?

Absolutely, here is the log right up until the list of python packages.

Loading \u24c8 Singularity
singularity pull --name /home/naxos2-raid34/logan-data/NeurInsight/c-pac:latest.sif docker://fcpindi/c-pac:latest
FATAL:   Image file already exists: "/home/naxos2-raid34/logan-data/NeurInsight/c-pac:latest.sif" - will not overwrite
FATAL:   Image file already exists: "/home/naxos2-raid34/logan-data/NeurInsight/c-pac:latest.sif" - will not overwrite
/home/naxos2-raid34/logan-data/NeurInsight/c-pac:latest.sif
Loading \u24c8 /home/naxos2-raid34/logan-data/NeurInsight/c-pac:latest.sif as "logan (3978)" with these directory bindings:
  local                                       Singularity                                 mode
  ------------------------------------------  ------------------------------------------  ------
  /etc/passwd                                 /etc/passwd                                 ro
  /home/stone-ext4/logan/.cpac                /home/stone-ext4/logan/.cpac                rw
  /home/naxos2-raid34/logan-data/NeurInsight  /home/naxos2-raid34/logan-data/NeurInsight  rw
  /home/naxos2-raid34/logan-                  /home/naxos2-raid34/logan-                  rw
  data/NeurInsight/outputs                    data/NeurInsight/outputs
  /home/naxos2-raid34/logan-                  /outputs                                    rw
  data/NeurInsight/outputs
  /home/naxos2-raid34/logan-                  /home/naxos2-raid34/logan-                  ro
  data/NeurInsight/bids_HCP25                 data/NeurInsight/bids_HCP25/
  /home/naxos2-raid34/logan-                  /home/naxos2-raid34/logan-                  rw
  data/NeurInsight/log                        data/NeurInsight/log
  /home/naxos2-raid34/logan-                  /home/naxos2-raid34/logan-                  rw
  data/NeurInsight/working                    data/NeurInsight/working
Logging messages will refer to the Singularity paths.

singularity run -B /etc/passwd:/etc/passwd:ro,/home/stone-ext4/logan/.cpac:/home/stone-ext4/logan/.cpac:rw,/home/naxos2-raid34/logan-data/NeurInsight:/home/naxos2-raid34/logan-data/NeurInsight:rw,/home/naxos2-raid34/logan-data/NeurInsight/outputs:/home/naxos2-raid34/logan-data/NeurInsight/outputs:rw,/home/naxos2-raid34/logan-data/NeurInsight/outputs:/outputs:rw,/home/naxos2-raid34/logan-data/NeurInsight/bids_HCP25:/home/naxos2-raid34/logan-data/NeurInsight/bids_HCP25/:ro,/home/naxos2-raid34/logan-data/NeurInsight/log:/home/naxos2-raid34/logan-data/NeurInsight/log:rw,/home/naxos2-raid34/logan-data/NeurInsight/working:/home/naxos2-raid34/logan-data/NeurInsight/working:rw instance://faux-signal-2510 /home/naxos2-raid34/logan-data/NeurInsight/bids_HCP25/ /home/naxos2-raid34/logan-data/NeurInsight/outputs participant --participant-label 100307 --mem-gb 30

Running BIDS validator
#### Running C-PAC for 100307
Number of participants to run in parallel: 1
Input directory: /home/naxos2-raid34/logan-data/NeurInsight/bids_HCP25
Output directory: /home/naxos2-raid34/logan-data/NeurInsight/outputs/output
Working directory: /home/naxos2-raid34/logan-data/NeurInsight/outputs/working
Log directory: /home/naxos2-raid34/logan-data/NeurInsight/outputs/log
Remove working directory: True
Available memory: 30.0 (GB)
Available threads: 1
Number of threads for ANTs: 1
Parsing /home/naxos2-raid34/logan-data/NeurInsight/bids_HCP25..
Did not receive any parameters for sub-100307/ses-ses01/anat/sub-100307_ses-ses01_run-01_T1w.nii.gz, is this a problem?
Starting participant level processing
Run called with config file /home/naxos2-raid34/logan-data/NeurInsight/outputs/log/pipeline_cpac-default-pipeline/sub-100307_ses-ses01/cpac_pipeline_config_c63327bd_2024-03-05T12-23-54Z.yml
240305-12:23:58,831 nipype.workflow INFO:
	 
    Environment
    ===========
    AFNI: 23.3.09:linux_universal
    ldd: (Ubuntu GLIBC 2.35-0ubuntu3.1) 2.35
    Python: 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:36:39) [GCC 10.4.0]
      Python packages

Great, thank you! I noticed some potential errors in your run script. You’re binding the output directory to the container as /outputs, but in the custom bindings you posted above the run command, the outputs folder is bound with the full path. If you change the run script to contain the full path it will be consistent, i.e. -B /home/naxos2-raid34/logan-data/NeurInsight/outputs:/home/naxos2-raid34/logan-data/NeurInsight/outputs. Also, the extra slash at the end of your BIDS directory may cause problems. If that doesn’t help, please let me know!

Thanks for taking a look - I’ll try and and see where it gets me. I was following the details provided in the pipeline config files:

 # Directory where C-PAC should write out processed data, logs, and crash reports.
    # - If running in a container (Singularity/Docker), you can simply set this to an arbitrary
    #   name like '/outputs', and then map (-B/-v) your desired output directory to that label.
    # - If running outside a container, this should be a full path to a directory.
    path: /outputs

But I guess I misunderstood that. Should I change the path in the pipeline_config, assuming I get it running with a custom (more minimal) pipeline?

No luck, errors are identical when trying to run default pipeline

 cpac --platform singularity -v \                                                                                                                                                                                 (py310) 
      -B /home/naxos2-raid34/logan-data/NeurInsight/outputs:/home/naxos2-raid34/logan-data/NeurInsight/outputs \
      run /home/naxos2-raid34/logan-data/NeurInsight/bids_HCP25 /home/naxos2-raid34/logan-data/NeurInsight/outputs participant \
        --participant-label 100307 --mem-gb 30

Produces

Loading \u24c8 Singularity
singularity pull --name /home/naxos2-raid34/logan-data/NeurInsight/c-pac:latest.sif docker://fcpindi/c-pac:latest
FATAL:   Image file already exists: "/home/naxos2-raid34/logan-data/NeurInsight/c-pac:latest.sif" - will not overwrite
FATAL:   Image file already exists: "/home/naxos2-raid34/logan-data/NeurInsight/c-pac:latest.sif" - will not overwrite
/home/naxos2-raid34/logan-data/NeurInsight/c-pac:latest.sif
Loading \u24c8 /home/naxos2-raid34/logan-data/NeurInsight/c-pac:latest.sif as "logan (3978)" with these directory bindings:
  local                                       Singularity                                 mode
  ------------------------------------------  ------------------------------------------  ------
  /etc/passwd                                 /etc/passwd                                 ro
  /home/stone-ext4/logan/.cpac                /home/stone-ext4/logan/.cpac                rw
  /home/naxos2-raid34/logan-data/NeurInsight  /home/naxos2-raid34/logan-data/NeurInsight  rw
  /home/naxos2-raid34/logan-                  /home/naxos2-raid34/logan-                  rw
  data/NeurInsight/outputs                    data/NeurInsight/outputs
  /home/naxos2-raid34/logan-                  /home/naxos2-raid34/logan-                  ro
  data/NeurInsight/bids_HCP25                 data/NeurInsight/bids_HCP25
  /home/naxos2-raid34/logan-                  /home/naxos2-raid34/logan-                  rw
  data/NeurInsight/log                        data/NeurInsight/log
  /home/naxos2-raid34/logan-                  /home/naxos2-raid34/logan-                  rw
  data/NeurInsight/working                    data/NeurInsight/working
Logging messages will refer to the Singularity paths.

singularity run -B /etc/passwd:/etc/passwd:ro,/home/stone-ext4/logan/.cpac:/home/stone-ext4/logan/.cpac:rw,/home/naxos2-raid34/logan-data/NeurInsight:/home/naxos2-raid34/logan-data/NeurInsight:rw,/home/naxos2-raid34/logan-data/NeurInsight/outputs:/home/naxos2-raid34/logan-data/NeurInsight/outputs:rw,/home/naxos2-raid34/logan-data/NeurInsight/bids_HCP25:/home/naxos2-raid34/logan-data/NeurInsight/bids_HCP25:ro,/home/naxos2-raid34/logan-data/NeurInsight/log:/home/naxos2-raid34/logan-data/NeurInsight/log:rw,/home/naxos2-raid34/logan-data/NeurInsight/working:/home/naxos2-raid34/logan-data/NeurInsight/working:rw instance://ornery-knife-6151 /home/naxos2-raid34/logan-data/NeurInsight/bids_HCP25 /home/naxos2-raid34/logan-data/NeurInsight/outputs participant --participant-label 100307 --mem-gb 30

Running BIDS validator
#### Running C-PAC for 100307
Number of participants to run in parallel: 1
Input directory: /home/naxos2-raid34/logan-data/NeurInsight/bids_HCP25
Output directory: /home/naxos2-raid34/logan-data/NeurInsight/outputs/output
Working directory: /home/naxos2-raid34/logan-data/NeurInsight/outputs/working
Log directory: /home/naxos2-raid34/logan-data/NeurInsight/outputs/log
Remove working directory: True
Available memory: 30.0 (GB)
Available threads: 1
Number of threads for ANTs: 1
Parsing /home/naxos2-raid34/logan-data/NeurInsight/bids_HCP25..
Did not receive any parameters for sub-100307/ses-ses01/anat/sub-100307_ses-ses01_run-01_T1w.nii.gz, is this a problem?
Starting participant level processing
Run called with config file /home/naxos2-raid34/logan-data/NeurInsight/outputs/log/pipeline_cpac-default-pipeline/sub-100307_ses-ses01/cpac_pipeline_config_c63327bd_2024-03-05T15-28-26Z.yml
240305-15:28:30,845 nipype.workflow INFO:
	 
    Environment
    ===========

With same complaints about missing outputs.

I was following the details provided in the pipeline config files

Yeah that’s exactly right, I just wanted to check that there weren’t two paths in the container for output directories, since in the output of your cpac version command the output directory path in the container was the full path.

Since it looks like it’s not a run command / binding issue, there are a few things I would like to check. First, if you run the command with the --save-working-dir flag, is there anything in the workdir? Also, could you attach the cpac-generated data config file? It should be called cpac_data_config_{...} in the /log/pipeline_name/sub_id subdirectory.

Alrighty, bit of a delay, but ran things with working directory flag and I can report that it is totally empty - absolutely nothing in the working directory (and I double checked - it was created at the time I ran the command and matches what was printed to screen saying where the working directory would be).

I did notice some oddities in the data_config file, but maybe thats the expected format? Attached as text file.

The jsons are very minimal here - this project is effectively testing various processing approaches, and at this stage, you could call it piloting. But the TR is there, and the nii headers contain valid voxel resolution information so I expected that not to be a major problem.

cpac_data_config_c63327bd_2024-03-12T16-43-26Z.txt (763 Bytes)

json text copied below, this is the minimal file specified at the top level (thus applying to all subjects).
task-REST_bold.json

{
    "RepetitionTime": 0.72,
    "EchoTime": 0.033,
    "EffectiveEchoSpacing": 0.00058,
    "MagneticFieldStrength": 3.0,
    "TaskName": "REST",
    "Manufacturer": "Siemens",
    "ManufacturerModelName": "Skyra",
    "PhaseEncodingDirection": "i"
}

Thank you for sending that over! It’s interesting that your data config file shows valid paths because it seems like the data isn’t getting pulled in properly. If you run the tree command in the folder containing your data, are there any sym links?

They are in fact symlinks - but I copied things locally, and had the same issue (unless I made another mistake there). I could try converting these symlinks, but I was under the impression that symlinks were ok now (though, seemed there may have been difficulties in the past…).

I’ll see if I can get one subject to work after converting the symlinks, its at least a direction to check.

(I’m jumping in quick since Elizabeth’s out of the office the rest of the week)

There’s no real issue with using symlinks, but cpac doesn’t (yet) automatically bind the real paths.

You should be able to add bindings for wherever the symlinks point (like if /home/naxos2-raid34/logan-data/NeurInsight/bids_HCP25/sub-100307/ses-ses01/anat/sub-100307_ses-ses01_run-01_T1w.nii.gz --> /home/naxos2-raid34/shared-data/bids_HCP25/sub-100307/ses-ses01/anat/sub-100307_ses-ses01_run-01_T1w.nii.gz you can just update your run call to something like

cpac --platform singularity -v \
-B /home/naxos2-raid34/shared-data/bids_HCP25:/home/naxos2-raid34/shared-data/bids_HCP25 \
run /home/naxos2-raid34/logan-data/NeurInsight/bids_HCP25/ /home/naxos2-raid34/logan-data/NeurInsight/outputs participant \
--pipeline_file /home/naxos2-raid34/logan-data/NeurInsight/cpac/pipeline_config_minimal.yml

You don’t need the -B /home/naxos2-raid34/logan-data/NeurInsight/outputs:/outputs since cpac will do that one automatically, but it doesn’t hurt anything to leave it in there.
)

If all the real paths have a common anscestor path, the simplest thing is to just bind that common anscestor. If they’re in different places, you can just bind as many paths as you need.

I have since converted all symlinks to file copies, and nothing has changed (as in error is identical, same missing outputs, etc) - so in a glass half full way, I don’t suppose symlinks were the issue.

Is there a way for it to produce even more verbose output? I’m somewhat at a loss for how to move forward here.

Is there a way for it to produce even more verbose output?

:thinking: The commandline wrapper might be consuming some of the logging from Singularity? We could try running directly in Singularity without the wrapper, like

singularity run \
  -B /home/naxos2-raid34/logan-data:/home/naxos2-raid34/logan-data \
  /home/naxos2-raid34/logan-data/NeurInsight/c-pac:latest.sif \
  /home/naxos2-raid34/logan-data/NeurInsight/bids_HCP25 /home/naxos2-raid34/logan-data/NeurInsight/outputs participant \
  --participant-label 100307\
  --mem-gb 30

and see if that gets anywhere or gets any additional error information to emit.

I’ll give that a shot, but I’ve suddenly got it working on my local machine ( where previously it was throwing same error, well, lack of error I suppose) so now I am even more confused. I’ll try and learn a bit more and update.

1 Like

We have a winner (perhaps). Previously it would jump directly to the “you have an error, here are all the files you are missing” - now I get the following output just prior to that:

Traceback (most recent call last):
  File "/code/CPAC/pipeline/cpac_pipeline.py", line 574, in run_workflow
    workflow_result = workflow.run(plugin=plugin,
  File "/usr/share/fsl/6.0/lib/python3.10/site-packages/nipype/pipeline/engine/workflows.py", line 628, in run
    execgraph = generate_expanded_graph(deepcopy(flatgraph))
  File "/usr/share/fsl/6.0/lib/python3.10/site-packages/nipype/pipeline/engine/utils.py", line 967, in generate_expanded_graph
    graph_in = _remove_nonjoin_identity_nodes(graph_in, keep_iterables=True)
  File "/usr/share/fsl/6.0/lib/python3.10/site-packages/nipype/pipeline/engine/utils.py", line 847, in _remove_nonjoin_identity_nodes
    _remove_identity_node(graph, node)
  File "/usr/share/fsl/6.0/lib/python3.10/site-packages/nipype/pipeline/engine/utils.py", line 873, in _remove_identity_node
    _propagate_internal_output(graph, node, field, connections, portinputs)
  File "/usr/share/fsl/6.0/lib/python3.10/site-packages/nipype/pipeline/engine/utils.py", line 948, in _propagate_internal_output
    destnode.set_input(inport, value)
  File "/usr/share/fsl/6.0/lib/python3.10/site-packages/nipype/pipeline/engine/nodes.py", line 312, in set_input
    setattr(self.inputs, parameter, deepcopy(val))
  File "/usr/share/fsl/6.0/lib/python3.10/site-packages/nipype/interfaces/base/traits_extension.py", line 330, in validate
    value = super(File, self).validate(objekt, name, value, return_pathlike=True)
  File "/usr/share/fsl/6.0/lib/python3.10/site-packages/nipype/interfaces/base/traits_extension.py", line 135, in validate
    self.error(objekt, name, str(value))
  File "/usr/share/fsl/6.0/lib/python3.10/site-packages/traits/base_trait_handler.py", line 74, in error
    raise TraitError(
traits.trait_errors.TraitError: The 'schedule' trait of a FLIRTInputSpec instance must be a pathlike object or string representing an existing file, but a value of '/usr/local/fsl/etc/flirtsch/bbr.sch' <class 'str'> was specified.
240430-09:06:46,299 nipype.workflow INFO:

If I jump into the container (cpac enter), I find that that file doesn’t exist, so makes sense that no path object could be found - fsl things are actually located at /usr/share/fsl/6.0/bin/fsl in the container.

So, I can set a pipeline config file to have
FSLDIR: /usr/share/fsl/6.0/
and then attempt to run the command using that pipeline, rather than the preconfig.

 singularity run -B /etc/passwd:/etc/passwd:ro,/home/stone-ext4/logan/.cpac:/home/stone-ext4/logan/.cpac:rw,/home/naxos2-raid34/logan-data/NeurInsight/cpac/pipeline_config_extra_minimal.yml:/home/naxos2-raid34/logan-data/NeurInsight/cpac/pipeline_config_extra_minimal.yml:ro,/home/naxos2-raid34/logan-data/NeurInsight:/home/naxos2-raid34/logan-data/NeurInsight:rw,/home/naxos2-raid34/logan-data/NeurInsight/cpac/output_100307extraminimal:/home/naxos2-raid34/logan-data/NeurInsight/cpac/output_100307extraminimal:rw,/home/naxos2-raid34/logan-data/NeurInsight/cpac/bids_HCP25:/home/naxos2-raid34/logan-data/NeurInsight/cpac/bids_HCP25:rw,/home/naxos2-raid34/logan-data/NeurInsight/cpac/bids_HCP25:/home/naxos2-raid34/logan-data/NeurInsight/cpac/bids_HCP25/:ro,/home/naxos2-raid34/logan-data/NeurInsight/log:/home/naxos2-raid34/logan-data/NeurInsight/log:rw,/home/naxos2-raid34/logan-data/NeurInsight/working:/home/naxos2-raid34/logan-data/NeurInsight/working:rw,/home/naxos2-raid34/logan-data/NeurInsight/outputs:/home/naxos2-raid34/logan-data/NeurInsight/outputs:rw instance://doopy-leg-9786 /home/naxos2-raid34/logan-data/NeurInsight/cpac/bids_HCP25/ /home/naxos2-raid34/logan-data/NeurInsight/cpac/output_100307extraminimal participant --participant-label 100307 --pipeline-file /home/naxos2-raid34/logan-data/NeurInsight/cpac/pipeline_config_extra_minimal.yml --mem-gb 60 --save_working_dir

But, this changes nothing - the error is the same. /usr/local/fsl is not set as the FSLDIR variable in any *rc file on this system. The only place that appears for me is in a local install of freesurfer, in which it is strangely not inheriting FSLDIR for its own FSL_DIR. Otherwise, in every shell (fish,bash,tcsh) FSLDIR points at my installation of fsl, if that matters.

I also tried with original FSLDIR: FSLDIR and one pointing at my local installation. Nothing changes, error remains the same.

I was able to get it running on another Linux system (local) as well - again with Docker rather than singularity. I’m not exactly sure whats going wrong on the servers, but its unfortunate. I’m guessing there isn’t a bare metal installation? I have managed installing freesurfer, fsl, afni, spm, ni* and even built ants from source… but apparently the singularity container is a bridge too far!

Thanks for the help folks - if I can learn anything else I’ll put it here in case it helps other folks - definitely a good point that the cpac command wrapper around the singularity command was eating the output, that at least gave me something more than a pseudo silent crash.

/usr/local/fsl is not set as the FSLDIR variable in any *rc file on this system. The only place that appears for me is in a local install of freesurfer, in which it is strangely not inheriting FSLDIR for its own FSL_DIR. Otherwise, in every shell (fish,bash,tcsh) FSLDIR points at my installation of fsl, if that matters.

That is odd. Singularity by default sets

Most of the environment variables set on your host, which are passed into the container.

but that behavior can be overridden:

You can choose to exclude passing environment variables from the host into the container with the -e or --cleanenv option.

I don’t see /usr/local/fsl anywhere in the source code outside of docstrings, comments, and skipped tests, so I’m pretty sure Singularity is pulling it from somewhere in the host environment.


I’m guessing there isn’t a bare metal installation?

You can install from source, but

  1. we don’t offer support for non-containerized installations
  2. you can’t have C-PAC and cpac installed in the same environment

I’ll keep poking around - I also looked through the code and noticed it only in the tests. It is strange, but it would make more sense that there is a file somewhere hanging onto that, even if echo $FSLDIR is showing the right thing. If that is indeed what is holding everything up then it has the potential to be a “simple” fix - finally a specific target to hunt for.