/sPyNNakerJupyter

Distributing sPyNNaker on the Jupyter platform

Primary LanguageJupyter NotebookGNU General Public License v2.0GPL-2.0

Installation

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).

Install JupyterHub

  1. 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
    
  2. It is additionally useful to install pip:

     wget https://bootstrap.pypa.io/get-pip.py
     python3 get-pip.py
    
  3. 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
    
  4. You can now install JupyterHub:

     python3 -m pip install jupyterhub
     npm install -g configurable-http-proxy
    

Checkout and install repositories

Checkout the following repositories:

  1. This repository:

     git clone https://github.com/SpiNNakerManchester/sPyNNaker8Jupyter
    
  2. 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 ..
    
  3. 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 ..
    
  4. 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 ..
    
  5. 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 ..
    

Install Docker

The sPyNNaker setup uses a Docker image launched for each client. To set this up:

  1. Install docker:

     sudo apt-get install docker.io
    
  2. Check the .spynnaker.cfg file 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.

  3. Set up the docker image:

     docker build -t spynnakerhbpdebug sPyNNakerDockerHBP/
    

Install Seafile Drive Client

Follow instructions at https://help.seafile.com/en/drive_client/drive_client_for_linux.html.

Configure

  1. Create folders where the EBRAINS drive should be mounted, and where the local work folder should be mounted.

  2. Update any references to /localhome/jupyter in the following files to point at the correct locations for where you have installed things:

    1. jupyterhub_config_hbp.py

    2. run_seafile_mounter.sh

    3. start_server_hbp.sh

Run Mounter and JupyterHub

  1. Start the mounter:

     start_mounter.sh
    

    Output is stored in mounter.out

  2. Start JupyterHub:

     start_server_hbp.sh
    

    Output is stored in server_hbp.out