This document details the installation of a JupyterHub system for running the sPyNNaker8 platform. The instructions below are for an Ubuntu system, but should be similar in other systems (with different commands, but the same outcome).
-
JupyterHub requires Python 3.4 to be installed, as well as npm and nodejs-legacy. On an Ubuntu system, these are installed using:
sudo apt-get install python3 npm nodejs-legacy -
It is additionally useful to install pip:
wget https://bootstrap.pypa.io/get-pip.py python3 get-pip.py -
This might result in pip for python 2 being overridden if installed. If so, you can correct this:
rm /usr/local/bin/pip ln -s /usr/local/bin/pip2 /usr/local/bin/pip -
You can now install JupyterHub:
python3 -m pip install jupyterhub npm install -g configurable-http-proxy
Checkout the following repositories:
-
This repository:
git clone https://github.com/SpiNNakerManchester/sPyNNaker8Jupyter -
DockerSpawner (launches a Docker container from an image for each user):
git clone https://github.com/SpiNNakerManchester/dockerspawner cd dockerspawner git checkout ports_and_mounts python setup.py develop --user cd .. -
FirstUseAuthenticator (First time a username is used, any password can be used, but that is then kept for future uses):
cd sPyNNakerJupyter git clone https://github.com/SpiNNakerManchester/firstuseauthenticator cd .. -
MultiAuth (Setup for using FirstUseAuthenticator, HBP OAuth and EBRAINS OAuth)
git clone https://github.com/SpiNNakerManchester/multiauth cd multiauth python setup.py develop --user cd .. -
ClbAuthenticator (EBRAINS authentication with drive mounting):
git clone https://github.com/SpiNNakerManchester/clb-authenticator cd clb-authenticator git checkout add_drive_mount python setup.py develp --user cd ..
The sPyNNaker setup uses a Docker image launched for each client. To set this up:
-
Install docker:
sudo apt-get install docker.io -
Check the
.spynnaker.cfgfile contains the appropriate values for your setup. You should have a spalloc server set up, and you should update the address of this in the config file. -
Set up the docker image:
docker build -t spynnakerhbpdebug sPyNNakerDockerHBP/
Follow instructions at https://help.seafile.com/en/drive_client/drive_client_for_linux.html.
-
Create folders where the EBRAINS drive should be mounted, and where the local work folder should be mounted.
-
Update any references to
/localhome/jupyterin the following files to point at the correct locations for where you have installed things:-
jupyterhub_config_hbp.py -
run_seafile_mounter.sh -
start_server_hbp.sh
-
-
Start the mounter:
start_mounter.shOutput is stored in
mounter.out -
Start JupyterHub:
start_server_hbp.shOutput is stored in
server_hbp.out