Installation#

  1. Python≥3.5 und pip installieren:

    # apt-get update
    # apt install python3
    # python3 -V
    Python 3.7.3
    # apt install python3-pip
    
  2. Service-User jupyter erstellen:

    # useradd -s /bin/bash -rmd /srv/jupyter jupyter
    
  3. Als Service-User jupyter das Repository klonen:

    # su - jupyter
    $ git clone https://github.com/veit/jupyter-tutorial.git
    
  4. Pipenv installieren:

    $  python3 -m pip install --user pipenv
    

    Dies installiert Pipenv in USER_BASE.

  5. USER_BASE ermitteln und in PATH eintragen:

    $  python3 -m site --user-base
    /srv/jupyter/.local
    

    Anschließend muss noch das bin-Verzeichnis angehängt und zu PATH in ~/.profile hinzugefügt werden, also:

    export PATH=/srv/jupyter/.local/bin:$PATH
    

    Schließlich wird das geänderte Profil eingelesen mit:

    $  source ~/.profile
    
  6. Virtuelle Umgebung erstellen und JupyterHub installieren:

    $  cd jupyter-tutorial/
    $  pipenv install
    
  7. nodejs und npm installieren:

    # apt install curl
    # cd ~
    # curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh
    # bash nodesource_setup.sh
    # apt install nodejs
    # nodejs -v
    v10.15.3
    # npm -v
    6.10.2
    

    10.x gibt dabei die Major-Version von nodejs an.

  8. Installieren der npm-Pakete:

    # npm install
    
  9. Installieren des HTTP-Proxy:

    # npm install -g configurable-http-proxy
    /usr/local/bin/configurable-http-proxy -> /usr/local/lib/node_modules/configurable-http-proxy/bin/configurable-http-proxy
    + configurable-http-proxy@4.1.0
    added 47 packages from 62 contributors in 6.208s
    
  10. Testen der Installation:

    $  pipenv run jupyterhub
    
    [I 2019-07-31 22:47:26.617 JupyterHub app:1912] JupyterHub is now running at http://:8000
    

    Mit ctrl-c könnt ihr den Prozess wieder beenden.