forked from xtianmcd/GCNeuro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup
66 lines (55 loc) · 2.51 KB
/
setup
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
58
59
60
61
62
63
64
65
66
#!/bin/bash
echo "Install dependencies"
sudo apt-get update
sudo apt-get --assume-yes install bzip2 git libxml2-dev unzip emacs tmux tcsh bc docker.io
echo "Anaconda"
wget https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh
bash Anaconda3-2019.03-Linux-x86_64.sh -b -p /home/xtian/anaconda3
rm Anaconda3-2019.03-Linux-x86_64.sh
echo 'export PATH=/home/xtian/anaconda3/bin:$PATH' >>~/.bashrc
source ~/.bashrc
sudo apt --assume-yes install python3-pip
pip install joblib nibabel --user
echo 'export BUCKET_DIR=ppmi-full' >>~/.bashrc
source ~/.bashrc
echo "Download data from "$BUCKET_DIR
gsutil cp -r "gs://$BUCKET_DIR/preproc$FOLDER_NUM" .
echo "Freesurfer"
wget https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/6.0.0/freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz
tar -zxvf freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz
echo 'export FREESURFER_HOME=/home/xtian/freesurfer' >>~/.bashrc
echo 'source $FREESURFER_HOME/SetUpFreeSurfer.sh' >>~/.bashrc
rm freesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz
gsutil cp "gs://$BUCKET_DIR/license.txt" ./freesurfer
echo 'export FSFAST_HOME=/home/xtian/freesurfer/fsfast' >>~/.bashrc
echo 'export MNI_DIR=/home/xtian/freesurfer/mni' >>~/.bashrc
echo 'export MINC_BIN_DIR=/home/xtian/freesurfer/mni/bin' >>~/.bashrc
echo 'export MINC_LIB_DIR=/home/xtian/freesurfer/mni/lib' >>~/.bashrc
echo 'export PERL5LIB=/home/xtian/freesurfer/mni/share/perl5' >>~/.bashrc
echo "FSL"
wget https://fsl.fmrib.ox.ac.uk/fsldownloads/fslinstaller.py
python2 fslinstaller.py -d /home/xtian/fsl -q
echo 'FSLDIR=/home/xtian/fsl' >>~/.bashrc
echo 'PATH=${FSLDIR}/bin:${PATH}' >>~/.bashrc
echo 'export FSLDIR PATH' >>~/.bashrc
echo '. ${FSLDIR}/etc/fslconf/fsl.sh' >>~/.bashrc
echo 'export FSL_DIR=/home/xtian/fsl' >>~/.bashrc
source ~/.bashrc
echo "MATLAB"
wget http://ssd.mathworks.com/supportfiles/downloads/R2015b/deployment_files/R2015b/installers/glnxa64/MCR_R2015b_glnxa64_installer.zip
unzip MCR_R2015b_glnxa64_installer.zip
sudo ./install -mode silent -agreeToLicense yes
rm MCR_R2015b_glnxa64_installer.zip
echo "BrainSuite"
gsutil cp "gs://$BUCKET_DIR/BrainSuite19a.linux.tar" .
tar -xvf BrainSuite19a.linux.tar
rm BrainSuite19a.linux.tar
echo "Diffusion Toolkit"
gsutil cp "gs://$BUCKET_DIR/Diffusion_Toolkit_v0.6.4.1_x86_64.tar" .
tar -xvf Diffusion_Toolkit_v0.6.4.1_x86_64.tar
rm Diffusion_Toolkit_v0.6.4.1_x86_64.tar
echo "Preproc Files"
gsutil cp "gs://$BUCKET_DIR/automate_preproc.py" .
gsutil cp "gs://$BUCKET_DIR/dtk.py" .
source ~/.bashrc
echo "Done! Ready to run preprocessing."