Skip to content

Instantly share code, notes, and snippets.

@mnadjit
Last active April 12, 2018 02:01
Show Gist options
  • Save mnadjit/81fd04f966ecb638a46c8dfd2107d7f6 to your computer and use it in GitHub Desktop.
Save mnadjit/81fd04f966ecb638a46c8dfd2107d7f6 to your computer and use it in GitHub Desktop.
Install FSL, R and R-Studio [ubuntu 16.04 LTS]
# Install Ubuntu on VM - shared folder enabled
# Install Guest Addition Disk
/media/username/VBox_GAs_5.2.6\VBoxLinuxAdditions.run
# Update packages
apt-get update
# Grant access to user to access shared folder
adduser $username vboxsf # needs reboot
# Install Python
apt-get -y install python
# Install FSL
# 1. Download fslinstaller.py via https://fsl.fmrib.ox.ac.uk/fsldownloads_registration
# 2. python fslinstaller.py
echo "
FSLDIR=/usr/local/fsl
. \$FSLDIR/etc/fslconf/fsl.sh
PATH=\$FSLDIR/bin:\$PATH
export FSLDIR PATH" >> ~/.profile
# Install R and required packages for installing devtools
apt-get -y install r-base r-base-dev libssl-dev libcurl4-openssl-dev
# Install neuroimaging packages in R:
R -e '
if (!require(devtools)) {
install.packages("devtools")
};
install.packages("oro.nifti");
install.packages("oro.dicom");
devtools::install_github("muschellij2/fslr");
devtools::install_github("stnava/ITKR");
devtools::install_github("stnava/ANTsR");
devtools::install_github("muschellij2/extrantsr");'
# Install R-Studio
apt-get -y install gdebi-core # install gdebi to install rstudio with
wget $rstudio_URL # download rstudio installation file -> find latest at https://www.rstudio.com/products/rstudio/download/#download
gdebi -n $downloaded_file # install rstudio
rm $downloaded_file # delete installation file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment