This repository contains everything for the workshop in Cambridge 2018. There are three ways that you can interact with its content:
If you want to have the full experience, use the docker container miykael/workshop_cambridge
. It provides the computational environment to run the notebooks on any system with all necessary dependencies installed. To install Docker on your system, follow one of those links:
- Ubuntu or Debian
- Windows 7/8/9/10 or Windows 10Pro
- OS X (from El Capitan 10.11 on) or OS X (before El Capitan 10.11).
Once Docker is installed, open up the docker terminal and test if it works with the command: docker run hello-world
Note: Linux users might need to use sudo
to run docker
commands or follow the post-installation steps.
Once docker is running on your system you can continue with downloading the docker image for this workshop. For this use the command:
docker pull miykael/workshop_cambridge
Once the download finished, proceed with the following steps:
- Run the following command in a terminal:
docker run -it --rm -p 8888:8888 miykael/workshop_cambridge
- Copy paste the link that looks like
http://20f109eba8e4:8888/?token=0312c1ef3b61d7a44ff5346d3d150c23249a548850e13868
into your webbrowser. - Replace the hash number
20f109eba8e4
afterhttp://
withlocalhost
or your local IP (probably192.168.99.100
) if you're on windows. - Once Jupyter Notebook is open, click on the
program.ipynb
notebook, and you're good to go.
And if you want to have access to the output data created within the docker container, add the command -v /path/to/your/output_folder:/output
before miykael/workshop_cambridge
, where /path/to/your/output_folder
should be a free folder on your system, such as /User/neuro/Desktop/output
.
Show running containers
$ docker ps
Show all installed Docker images
$ docker images
Show all (also stopped) containers
$ docker ps -a
Remove a container
$ docker rm $CONTAINER_ID
Remove a docker image
$ docker rmi -f $IMAGE_ID
Start a stopped container & attach to it
$ docker start -ia $CONTAINER_ID
Note: when you stop a container (Ctrl-C), and then re-execute above "docker run" command, you will end up with a second container. If you want to access your previous container (e.g. with downloaded data), you must reconnect to it (see "docker start -ia" command below).
If you don't care about some of the software dependencies, or have them already installed on your system, you can use conda to create the necessary python environment to run the notebooks:
- If you haven't yet, get conda on your system: https://conda.io/miniconda.html
- Download the
environment.yml
file from [here].(https://github.com/miykael/workshop_cambridge/blob/master/environment.yml) - Open up a conda terminal (or any other terminal), and create a new conda environment with the following command:
conda env create --name workshop --file /path/to/file/environment.yml
- Download the notebooks in this repository (here), save them in the desired location, i.e. (
Desktop/workshop
). - Download the two datasets adhd and ds000114 and put them into the workshop folder, i.e. (
Desktop/workshop
). - Open up a (docker) terminal, activate the conda environment with
source activate workshop
(for mac and linux) or withactivate workshop
(for windows), go into the folder where you saved the just downloaded notebooks (i.e.Desktop/workshop
) and run the following command from the folder that contains theprogram.ipynb
notebook:jupyter notebook
Note: This only provides you the notebooks from the workshop that are not already in the nipype_tutorial
. Those notebooks you can download here: https://github.com/miykael/nipype_tutorial
All the notebooks (but not the slides) can be looked at via Jupyter nbviewer. Like this you can see everything but cannot really interact with the scripts or run the code.