Skip to content

Conversation

@Lestropie
Copy link
Member

@Lestropie Lestropie commented Mar 11, 2025

Closes #2601.
Closes #2736.


Working toward desired long-term solution for software containerisation.

The goal here is that "the MRtrix3 container" will not contain any third-party neuroimaging software tools. What will therefore happen following this PR, if one executes within this container an MRtrix3 Python command that attempts to execute such a third-party command, that MRtrix3 command will error out, with a suitable error message explaining the situation.

In conjunction with this, I aim to create a new repository within the MRtrix3 organisation, which provides the requisite data to construct a container that encapsulates both MRtrix3 and the set of third-party neuroimaging software commands that may be invoked by MRtrix3 Python commands. However that container will be explicitly labelled as having additional contents over and above just MRtrix3 (ideas for suitable naming welcome; "MRtrix3 and friends"? 🙃).


  • Make corresponding changes to Singularity
    I've been having trouble doing Apptainer builds for some reason, so haven't finished the requisite work there.

  • Create new page in documentation explaining the dependence of some MRtrix3 commands on third-party tools, why those are unavailable in the official "core" "exclusively MRtrix3" container, and what options are available to users

    • Update bash file that generates the error message to link to this new documentation page
  • Create new repository for container that includes third-party commands

    • Encode minified dependencies based on text files listing items to be preserved, rather than tarballing and distributing other people's software (Alternative minification encoding #2684)
      (I already have some progress on this)

With this change, "the MRtrix3 Docker container" will no longer embed within it third-party neuroimaging software commands. Any attempt to run an MRtrix3 script that depends on one of these tools will fail with a suitable error message.
@Lestropie Lestropie added the container Docker or Singularity containers label Mar 11, 2025
@Lestropie Lestropie added this to the 3.1.0 updates milestone Mar 11, 2025
@Lestropie Lestropie self-assigned this Mar 11, 2025
@Lestropie
Copy link
Member Author

I have created the new repository and the first working version of the standalone container with alternative minification encoding: https://github.com/MRtrix3/mrtrix3-with3p/commits/dev/

Lestropie added a commit that referenced this pull request Mar 12, 2025
- Fix progress bar for when FSL FAST is not used for the cerebellum, and the FreeSurfer segmentations of the cerebellar hemispheres are propagated to the 5TT image.
- New option -freesurfer_lut, for manually specifying the location of the FreeSurfer lookup table file; this permits utilisation of the script without environment variable FREESURFER_HOME being set, or indeed even the FreeSurfer software being present (related to #3073).
- Add missing citations to help page documentation.
Lestropie added a commit that referenced this pull request Mar 12, 2025
- Fix progress bar for when FSL FAST is not used for the cerebellum, and the FreeSurfer segmentations of the cerebellar hemispheres are propagated to the 5TT image.
- New option -freesurfer_lut, for manually specifying the location of the FreeSurfer lookup table file; this permits utilisation of the script without environment variable FREESURFER_HOME being set, or indeed even the FreeSurfer software being present (related to #3073).
- Add missing citations to help page documentation.
@Lestropie Lestropie mentioned this pull request Mar 14, 2025
5 tasks
@Lestropie Lestropie force-pushed the containers_no_thirdparty branch 2 times, most recently from afe7f5b to 7ac759a Compare August 26, 2025 07:51
Conflicts:
	Dockerfile
	docs/installation/using_containers.rst
	python/mrtrix3/app.py
@github-actions
Copy link

clang-tidy review says "All clean, LGTM! 👍"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

container Docker or Singularity containers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants