All code for this document is located here.
Here we will discuss how to get FSL (and other Linux only applications) onto a Windows machine using the Windows Subsystem for Linux (WSL). All of these instructions require Windows 10 or higher. Some of this content was adapted from http://www.nemotos.net/?p=1481.
Information below can be found here (https://docs.microsoft.com/en-us/windows/wsl/install-win10)
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Download and install your preferred Linux distribution from the Windows Store – Ubuntu is the recommended distribution. There are other options to download from Command-Line/Script or download and manually Unpack/Install.
Open Ubuntu. Here we will set up NeuroDebian using bash
, which houses a ton of neuroimaging software:
sudo apt-get update -qq -y
sudo apt-get install -y wget git
OS_DISTRIBUTION=$(lsb_release -cs)
wget -O- http://neuro.debian.net/lists/${OS_DISTRIBUTION}.us-nh.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-key adv --recv-keys --keyserver hkp://pool.sks-keyservers.net:80 0xA5D32F012649A5A9
sudo apt-get update
sudo apt-get install fsl
echo ". /etc/fsl/fsl.sh" >> ~/.bashrc
echo "export DISPLAY=localhost:0.0" >> ~/.bashrc
This will set up the FSL environment whenever you have bash
opened up in a new window. Also, this will allow FSL to open displays on the machine.
x11
apps (https://virtualizationreview.com/articles/2017/02/08/graphical-programs-on-windows-subsystem-on-linux.aspx):sudo apt-get install x11-apps
R
R
with OpenBLAS capabilities:sudo apt-get install libopenblas-base r-base
export RSTUDIO_VERSION=$(wget --no-check-certificate -qO- https://s3.amazonaws.com/rstudio-server/current.ver)
echo "VERSION ${RSTUDIO_VERSION}"
sudo wget -q http://download2.rstudio.org/rstudio-server-${RSTUDIO_VERSION}-amd64.deb
sudo gdebi --non-interactive rstudio-server-${RSTUDIO_VERSION}-amd64.deb
sudo rm rstudio-server-*-amd64.deb
https://localhost:8787
, which should give you a login screen. Use the login information for the Ubuntu machine to use RStudio (with the Linux backend) on the Windows machine!R
devtools
:sudo apt-get update -qq -y
sudo apt-get install -y libgit2-dev
sudo apt-get install -y libcurl4-openssl-dev libssl-dev
sudo apt-get install -y zlib1g-dev libssh2-1-dev libpq-dev libxml2-dev
sudo apt-get install -y libhdf5
R
. Install devtools
and fslr
:install.packages("devtools", repos = "https://cran.rstudio.com/")
source("https://neuroconductor.org/neurocLite.R")
neuro_install("fslr")
Check this installation by trying to run some help file, such as:
fslr::fast.help()
R
. Install devtools
and fslr
:neuro_install("extrantsr")
devtools::session_info()