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.sh
script from https://repo.anaconda.com - Download a
fsl-environment.yml
specification 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.yml
conda environment at$FSLDIR
- Configure the user's environment (e.g.
.bashrc
)
Specific requirements
-
Set
FSL_CREATE_WRAPPER_SCRIPTS
variable 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$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 calledFSL_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 FSLMakefile
system. This requires the$FSLDIR
conda environment to be activated, so that a compiler toolchain installed into$FSLDIR
is made available, as outlined in thefsl/conda/docs
. In order to accomplish this, thefsl-devel.sh
script needs to know the location of the conda base environment which was created by thefslinstaller
script. This can be achieved by having thefslinstaller
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 thefslinstaller
, or a custom installation, created by users installing FSL packages directly into their own user-managed conda environment.