Skip to content

Installation

Adrian Wilke edited this page Aug 27, 2018 · 27 revisions

Installation on Ubuntu 16.04 virtual machine

Upgrade to Ubuntu 18.04 LTS

sudo apt-get update
sudo apt-get upgrade --yes
sudo apt-get dist-upgrade --yes
sudo do-release-upgrade

Source: http://www.ubuntubuzz.com/2018/04/how-to-upgrade-ubuntu-from-1604-lts-to-1804-lts-using-command-lines.html

Docker installation

sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

sudo apt-get update
sudo apt-get install docker-ce
sudo docker run hello-world

Source: https://docs.docker.com/install/linux/docker-ce/ubuntu/#os-requirements

Installation of nbgraderutils (Dockerfile and shell scripts)

Download the shell scripts and the Dockerfile.
The files can be found in the code repository:
https://github.com/dice-group/nbgraderutils
You can use git clone or wget.

Example for diceapp

Login to your virtual machine via ssh.
Download the needed files:

wget https://github.com/dice-group/nbgraderutils/blob/master/diceapp/docker/Dockerfile
wget https://github.com/dice-group/nbgraderutils/blob/master/diceapp/scripts/build.sh
wget https://github.com/dice-group/nbgraderutils/blob/master/diceapp/scripts/run.sh
wget https://github.com/dice-group/nbgraderutils/blob/master/diceapp/scripts/bash.sh
chmod +x *.sh

Edit the files, if you want to change linux user names, docker container names, ports, or directories.
Build the docker image and run the docker container:

./build.sh
./run.sh

Create passwords for admin and user (replace PSW):

usermod --password $(openssl passwd -1 PSW) nbgadmin
usermod --password $(openssl passwd -1 PSW) nbguser

Ensure existence of configuration file:

mv /srv/jupyterhub/jupyterhub_config.py /srv/jupyterhub/jupyterhub_config.py.BACKUP1
mv /tmp/jupyterhub_config.py /srv/jupyterhub/jupyterhub_config.py.BACKUP2
cp /srv/jupyterhub/jupyterhub_config.py.BACKUP2 /srv/jupyterhub/jupyterhub_config.py
Clone this wiki locally