README.md 6.69 KB
Newer Older
1
2
3
4
5
6
# FSL conda package infrastructure


_This documentation is a work in progress_


Paul McCarthy's avatar
Paul McCarthy committed
7
8
This repository hosts information and documentation regarding the FSL conda
package infrastructure.
9

10

Paul McCarthy's avatar
Paul McCarthy committed
11
12
This `README` file contains a general overview. More detailed information on
different topics can be found in the folowing files:
13

14

Paul McCarthy's avatar
Paul McCarthy committed
15
16
17
18
19
20
21
22
23
24
 - [`development_workflow.md`](development_workflow.md): Details on
   development and release workflows and processes.
 - [`official_fsl_installations.md`](official_fsl_installations.md): Details
   on official/full conda-based FSL installations.
 - [`local_development.md`](local_development.md): Setting up an FSL
   development environment on your own machine.
 - [`building_fsl_conda_packages.md`](building_fsl_conda_packages.md): Details
   on how to build a FSL conda package locally.
 - [`creating_fsl_conda_recipes.md`](creating_fsl_conda_recipes.md): Details
   on how to create a FSL conda recipe.
25
26


27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
## Quick summary


FSL is organised into a number of repositories hosted at
https://git.fmrib.ox.ac.uk.

 - `fsl/conda/docs`: (this repository): High level documentation
 - `fsl/<project>`: Source code repository for FSL project `<project>`
 - `fsl/conda/fsl-<project>`: Conda recipe repository for FSL project
   `<project>`
 - `fsl/fsl-ci-rules`: CI rules for automated building and publishing of
   FSL conda packages
 - `fsl/conda/manifest`: Generating and releasing `manifest.json` and
   `environment.yml` files for public and internal FSL releases.
 - `fsl/conda/manifest-rules`: Scripts used by the `fsl/conda/manifest`
   repository.
 - `fsl/conda/installer`: Home of the `fslinstaller.py` script, for
   installing FSL


47
48
## Overview

Paul McCarthy's avatar
Paul McCarthy committed
49
50
51
FSL is installed using the [**conda**](https://conda.io/) package and
environment management system. Each FSL project is built as a conda package,
and published to an internally hosted conda channel.
52

53

54
Prior to FSL 6.0.6, FSL was released and installed as a monolithic archive
Paul McCarthy's avatar
Paul McCarthy committed
55
56
57
58
file, containing most FSL tools, and a separate conda environment called
`fslpython`, configured after the archive file was installed. Some of the
reasons for transitioning to a purely conda-based release model are as
follows:
59
60
61

 - Simplify FSL installation procedure
 - Reduce the size of `$FSLDIR`
Paul McCarthy's avatar
Paul McCarthy committed
62
63
64
 - Allow "minimal" FSL installations, with only the utilities that are
   required
 - Improve build reproducibility
65
 - Improve support for container-based FSL installations
Paul McCarthy's avatar
Paul McCarthy committed
66
67
 - Simplify cross-platform management of external dependencies (e.g. VTK,
   OpenBLAS)
68
69


70
## FSL releases
71

72
73
FSL releases are installed via a script called `fslinstaller.py`, which is
maintained at the fsl/conda/installer> repository.
74
75


76
77
78
79
80
81
82
83
Each available build (e.g. Linux, macOS, etc) for official FSL release is
defined by a conda [`environment.yml`
specification](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#create-env-file-manually).
This specification contains a list of all of the packages, including their
versions, to be installed. Available `environment.yml` builds are described by
a `manifest.json` file. The `manifest.json` and `environment.yml` files for
both public and internal releases are generated from information stored in the
fsl/conda/manifest> repository.
84

85

86
The `fslinstaller.py` script performs the following tasks:
87

88
89
90
91
92
93
1. Downloads the FSL release `manifest.json` file, and the appropriate
   `environment.yml` file for the platform.
2. Downloads a `miniconda` installer.
3. Installs a base `miniconda` environment into `$FSLDIR` (where `$FSLDIR`
   defaults to `/usr/local/fsl/`, or is explicitly specified by the user).
4. Installs all FSL packages into the `$FSLDIR` base conda environment.
Paul McCarthy's avatar
Paul McCarthy committed
94
95
5. Sets up the user shell profile so that FSL is configured in their shell
   environment by default.
96
97
98
99
100


## Partial FSL installations


Paul McCarthy's avatar
Paul McCarthy committed
101
102
103
Users may choose to install specific FSL packages by installing the desired
FSL packages directly from the FSL conda channel into their own conda
environment.
104
105


Paul McCarthy's avatar
Paul McCarthy committed
106
107
108
109
110
111
> **Note:** All FSL conda packages list the dependencies required for their
> execution, so when a particular package is installed, all of its run-time
> dependencies will also be installed. However, as we transition away from
> monolithic installations and towards conda-based installations, there are
> likely to be omissions and errors in the dependency hierarchy. These issues
> will be resolved on a case-by-case basis.
112
113


114
115
## FSL conda packages

116

117
118
119
All FSL projects and their dependencies are published as conda packages. Most
FSL conda packages are published to an internally maintained channel, but some
packages are published to the `conda-forge` channel at https://anaconda.org.
120

121

Paul McCarthy's avatar
Paul McCarthy committed
122
123
124
125
126
All FSL projects, and any dependencies which are not available on
https://anaconda.org, are built according to a conda *recipe*, which describes
how the project can be built as a conda package. All FSL conda recipes are
hosted as git repositories on the FMRIB gitlab server, under the `fsl/conda/`
group.
127

128

Paul McCarthy's avatar
Paul McCarthy committed
129
130
To clarify, each FSL project, and internally managed dependency, comprises
**two** git repositories<sup>*</sup>:
131

Paul McCarthy's avatar
Paul McCarthy committed
132
133
134
135
* The **project** repository contains the project source code/resources, and
  is typically hosted at `https://git.fmrib.ox.ac.uk/fsl/<project>`
* The **recipe** repository contains a conda recipe for the project, and is
  hosted at `https://git.fmrib.ox.ac.uk/fsl/conda/fsl-<project>`.
136
137


Paul McCarthy's avatar
Paul McCarthy committed
138
139
140
FSL conda packages are built automatically using Gitlab CI - the CI
infrastructure for automatically building conda packages is hosted in the
fsl/fsl-ci-rules> repository.
141
142


Paul McCarthy's avatar
Paul McCarthy committed
143
144
145
146
147
> <sup>*</sup>A small number of FSL projects have more than one recipe
> repository associated with them - for example, the
> [`fsl/fdt`](https://git.fmrib.ox.ac.uk/fsl/fdt) project has two recipes -
> the [`fsl/conda/fsl-fdt`](https://git.fmrib.ox.ac.uk/fsl/conda/fsl-fdt)
> recipe provides CPU executables, and the
148
> [`fsl/conda/fsl-fdt-cuda`](https://git.fmrib.ox.ac.uk/fsl/conda/fsl-fdt-cuda)
Paul McCarthy's avatar
Paul McCarthy committed
149
> recipe provides GPU/CUDA executables.
150
151


152
153
## Public and internal channels

154

155
156
FSL projects are published to one of two conda internally managed conda
channels:
157

158
159
160
161
162
  - The **public** channel contains stable and development packages for most
    FSL projects.  Every time a new tag is added to a project repository, a
    stable conda package is built and published to the public channel. Every
    time commits are merged into the master branch of a repository, a
    development conda package is built and published to the public channel.
163

164
165
166
  - The **internal** channel contains stable and development packages for FSL
    projects which are not part of official FSL releases, and are only part of
    internal release.
167
168
169
170

These channels are currently hosted online at the following URLs, although
their location will potentially change in the future:

171
172
173

 - http://18.133.213.73/public/
 - http://18.133.213.73/internal/