Skip to content

Instantly share code, notes, and snippets.

@lkoelman
Last active August 4, 2019 10:20
Show Gist options
  • Save lkoelman/2257b3522662055466dc724bc3a1ede6 to your computer and use it in GitHub Desktop.
Save lkoelman/2257b3522662055466dc724bc3a1ede6 to your computer and use it in GitHub Desktop.
Install FSL on Fedora Linux

Download the FSL installer (python script) from https://fsl.fmrib.ox.ac.uk/fsldownloads_registration.

Type following commands in a Python interpreter:

from fslinstaller import *
manifest = get_web_manifest(Settings.mirror)
import json
with open('~/manifest.json', 'w') as fp:
  json.dump(manifest, fp)

Open the manifest.json file and look for the filenamename of the latest CentOS FSL version (ending in .tar.gz).

Append this filename to the string in Settings.mirror and paste into your browser: this downloads the required binaries.

# Install dependencies
sudo yum install expat-devel libmng libpng12

# Extract FSL binaries into desired folder (I chose `~/.local`)
cd ~/.local
tar -xzf ~/Downloads/fsl-<fsl_version)-<centos_version>.tar.gz
FSLDIR=`pwd`/fsl
. fsl/etc/fslconf/post_install.sh -f $FSLDIR

Add folowing lines to .bashrc:

FSLDIR=$HOME/.local/fsl
PATH=${FSLDIR}/bin:${PATH}
export FSLDIR PATH
. ${FSLDIR}/etc/fslconf/fsl.sh
@msp-trc
Copy link

msp-trc commented Jul 18, 2019

the tilde () is vanishing from the previous ('/manifest.json) in both locations (code and error msg)

@Carles567
Copy link

Hey, how did it go? Did you manage to install it?

@lkoelman
Copy link
Author

lkoelman commented Aug 4, 2019

Hey guys,

I don't know why the tilde is vanishing in your interpreter but it's not important. Just use any valid file path that is writable to you which let's you open the downloaded json file.

Or even just print out the manifest content in your interpreter using print(manifest) instead of writing it to file.

Cheers,
Lucas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment