Requirements for fslinstaller for new conda-based FSL installations

The purpose of this issue is to document a number of steps which will need to be performed by the fslinstaller script when we migrate to conda-based FSL installations. It is not intended to be acted upon right now, as it is likely that the fslinstaller script will be substantially re-factored/re-written (as its requirements will be quite different once we move to conda).

High level overview

The behaviour of a future fslinstaller script which installs a conda-based version of FSL is roughly as follows:

  1. Ask the user what version of FSL they want to install
  2. Ask the user where they would like to install FSL (== $FSLDIR)
  3. (Advanced, available as a command-line option only) Ask the user where they would like to install the base miniconda environment (default: $FSLDIR/../.fslconda/)
  4. Download a miniconda-installer.sh script from https://repo.anaconda.com
  5. Download a fsl-environment.yml specification from https://fsl.fmrib.ox.ac.uk/fsldownloads/`
  6. Install a miniconda base environment into $FSLDIR/../.fslconda/ (or to the location specified by the user)
  7. Create the fsl-environment.yml conda environment at $FSLDIR
  8. Configure the user's environment (e.g. .bashrc)

Specific requirements

  • Set FSL_CREATE_WRAPPER_SCRIPTS variable during installation As outlined in the fsl/conda/docs, wrapper scripts for FSL executables are created in $FSLDIR/share/fsl/bin/, which wrap the FSL executables installed in $FSLDIR/bin/. This is done so that end users can add $FSLDIR/share/fsl/bin/ to their $PATH rather than $FSLDIR/bin/, as they would otherwise be adding all executables that are contained in $FSLDIR/bin/. Wrappers are created by the $FSLDIR/share/fsl/sbin/createFSLWrapper script, which will only create wrappers if an environment variable called FSL_CREATE_WRAPPER_SCRIPTS is set. This variable only needs to be set during installation.
  • Create $FSLDIR/share/fsl/base_environment The $FSLDIR/etc/fslconf/fsl-devel.sh script configures a user's local environment so that they can build FSL projects which use the FSL Makefile system. This requires the $FSLDIR conda environment to be activated, so that a compiler toolchain installed into $FSLDIR is made available, as outlined in the fsl/conda/docs. In order to accomplish this, the fsl-devel.sh script needs to know the location of the conda base environment which was created by the fslinstaller script. This can be achieved by having the fslinstaller write the location of the base environment to a plain-text file, located at $FSLDIR/share/fsl/base_environment. The presence or absence of this file can also be used to determine whether a particular FSL installation is a "full" installation, created by the fslinstaller, or a custom installation, created by users installing FSL packages directly into their own user-managed conda environment.
Edited by Paul McCarthy