Commit c70a0cd4 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

DOC: Overview on building conda packages locally

parent d0391ce9
# Building FSL conda packages locally
This document describes how to build a conda package for an FSL project from the corresponding conda reicpe.
It does not describe how to *create* a conda recipe for a FSL project - that is described in [``](
Normally there should be no need to build FSL conda packages by hand, as stable and development packages are automatically built using Gitlab CI. However the need may arise for development, testing, or debugging purposes, and hence is described here.
In order to build a FSL conda package locally, all you need is a (mini)conda environment with `conda-build` installed. You do not need to have a compiler, or even FSL, installed.
## Step 1: Clone the recipe repository
You must have a local clone of the recipe repository. For example, if you would like to build a package for `fsl/avwutils`:
git clone
By default, the `fsl-avwutils` conda recipe will build a package from the last released version (tag) on the `fsl/avwutils` gitlab repository. If you would like to build a package for a different release, or for a specific branch, you can set the `FSLCONDA_REVISION` variable to override the default setting. For example, if you want to build a package for the `master` branch:
If you would like to build a package from a *local* clone of `fsl/avwutils`, you can use the `FSLCONDA_REPOSITORY` variable to override the default setting (which is to build from the gitlab `fsl/avwutils` project):
git clone
export FSLCONDA_REPOSITORY=$(pwd)/avwutils
> Note: It is not currently possible to build a conda package from a local copy of a project which is *not* a git repository. This functionality may be added in the future if it is deemed necessary.
Now you can run `conda build` to build the conda package. The channel order is very important, and must be:
1. `conda-forge` Packages from conda-forge have highest priority
2. `defaults` Packages from anaconda have higher priority than the FSL channel
3. The FSL conda channel has the lowest priority.
> Note: The FSL conda channel URL is not yet finalised.
cd fsl-avwutils
conda build \
-c conda-forge \
-c defaults \
-c <fsl-conda-channel-url> \
--output-folder=dist \
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment