-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·57 lines (48 loc) · 1.19 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
num_processors_building_mrtrix3=1
dir_fsl=~/TractSeg/libs/fsl
install_system_requirements() {
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt update
sudo apt install -y python3.9 python3.9-venv python3.9-dev python-is-python3
sudo apt install -y $(cat requirements/requirements_apt.txt)
}
activate_python_venv() {
python3.9 -m venv .venv
source .venv/bin/activate
}
install_python_requirements() {
pip install --upgrade pip
pip install wheel
pip install -r requirements/requirements_pip.txt
pip install -e .
}
install_mrtrix3() {
export NUMBER_OF_PROCESSORS=$num_processors_building_mrtrix3
cd libs
git clone https://github.com/MRtrix3/mrtrix3.git
cd mrtrix3
./configure
./build
./set_path
cd ../..
}
install_fsl() {
export FSLDIR=$dir_fsl
cd libs
wget https://fsl.fmrib.ox.ac.uk/fsldownloads/fslconda/releases/fslinstaller.py
python fslinstaller.py
rm fslinstaller.py
}
install_explicit_dependencies() {
mkdir -p libs
install_mrtrix3
install_fsl
}
main() {
install_system_requirements
activate_python_venv
install_python_requirements
install_explicit_dependencies
}
main