Materials for an intro to neuroimaging in python tutorial from, orignally given at the Compute Ontario Summer School Toronto, july 2017
First you need to ssh to one of the niagara nodes to clone this repo
ssh [email protected]
git clone
mkdir ~/.conda/envs
ln -s /scinet/course/ss2018/3_bm/1_mripython/conda_envs/coss2018_mri ~/.conda/envs/coss2018_mri
Open a terminal on your laptop (can be mobaxterm on a Windows laptops) (with USERNAME replaced by your compute username)
You will be prompted for you SciNet PASSWORD
ssh -L8888:tds04:8000 [email protected] -N
Once if you did this properly. It will look like nothing happend. KEEP THIS TERMINAL OPEN. And point your local browser to "localhost:8888
Step 1.. start anaconda or miniconda..
Note in the example below..we are naming our environment "mripython" but you can call it whatever you want
conda create -n mripython3.5 python=3.5
source activate mripython3.5
conda install -c conda-forge nilearn
conda install seaborn
conda install docopt
conda install jupyter
source deactivate
The version available in conda-forge is a year old.. newer released are available to pip install..
Note: everything we will do in this tutorial has been tested with the above env
conda create -n mripython3.6 python=3.6
source activate mripython3.6
conda install scikit-learn
conda install seaborn
pip install nibabel
pip install -U nilearn
conda install docopt
conda install jupyter
## loads conda
module load PYTHON/3.6
## create the conda env into ${HOME}/.conda/envs/ with name 3.6_nilearn_01
conda create -n 3.6_nilearn_01 python=3.6
## activates that conda environment
source activate 3.6_nilearn_01
## install the packages - note jupyter is needed for us to be able to use it on jyputer hub
conda install jupyter
conda install scikit-learn
conda install seaborn
pip install nibabel
pip install nilearn
conda install docopt
## adds the 3.6_nilearn_01 environment to the kernels available by jupyter hub
python -m ipykernel install --user --name 3.6_nilearn_01 --display-name "Python (3.6_nilearn_01)"
## deactivate the conda environment
source deactivate
- you need to load the python/anaconda module first
- here we specified the full path to the conda env we want to build
module load python/3.6.4-anaconda5.1.0
conda create -p /scinet/course/ss2018/3_bm/1_mripython/conda_envs/coss2018_mri python=3.6
source activate /scinet/course/ss2018/3_bm/1_mripython/conda_envs/coss2018_mri
conda install -c conda-forge nilearn
conda install seaborn
conda install docopt
conda install jupyter
pip install qbatch # an extra package for running things in parallel on the GPC
source deactivate