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:
- Ask the user what version of FSL they want to install
- Ask the user where they would like to install FSL (==
$FSLDIR) - (Advanced, available as a command-line option only) Ask the user where they would like to install the base miniconda environment (default:
$FSLDIR/../.fslconda/) - Download a
miniconda-installer.shscript from https://repo.anaconda.com - Download a
fsl-environment.ymlspecification from https://fsl.fmrib.ox.ac.uk/fsldownloads/` - Install a miniconda base environment into
$FSLDIR/../.fslconda/(or to the location specified by the user) - Create the
fsl-environment.ymlconda environment at$FSLDIR - Configure the user's environment (e.g.
.bashrc)
Specific requirements
-
Set
FSL_CREATE_WRAPPER_SCRIPTSvariable during installation As outlined in thefsl/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$PATHrather 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/createFSLWrapperscript, which will only create wrappers if an environment variable calledFSL_CREATE_WRAPPER_SCRIPTSis set. This variable only needs to be set during installation. -
Create
$FSLDIR/share/fsl/base_environmentThe$FSLDIR/etc/fslconf/fsl-devel.shscript configures a user's local environment so that they can build FSL projects which use the FSLMakefilesystem. This requires the$FSLDIRconda environment to be activated, so that a compiler toolchain installed into$FSLDIRis made available, as outlined in thefsl/conda/docs. In order to accomplish this, thefsl-devel.shscript needs to know the location of the conda base environment which was created by thefslinstallerscript. This can be achieved by having thefslinstallerwrite 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 thefslinstaller, or a custom installation, created by users installing FSL packages directly into their own user-managed conda environment.
Edited by Paul McCarthy