Giter Site home page Giter Site logo

yfyh2013 / mp-jupyterhub Goto Github PK

View Code? Open in Web Editor NEW

This project forked from materialsproject/mp-jupyterhub

0.0 1.0 0.0 9 KB

Jupyterhub for spinning up materials project notebook environments

License: BSD 2-Clause "Simplified" License

Shell 1.48% Python 98.52%

mp-jupyterhub's Introduction

Jupyterhub Setup For Materials Project Docker Image

This service will allow you to spin up a multiuser Jupyter notebook environment with the materialsproject Docker image. It uses Github OAuth to authenticate users.

Prerequisistes

  • Python 3
  • Docker
  • Node.js
  • A Github Account

Jupyterhub requires Python 3. Either install your OS specific Python 3 or download the Anaconda distribution.

You can get node.js from https://nodejs.org/en/

First get the Docker image:

docker pull materialsproject/jupyterhub-singleuser

Install and Setup

  1. Install the requirements

    npm install -g configurable-http-proxy
    pip3 install -r requirements.txt
    

    This will install jupyter, jupyterhub, dockerspawner and oauthenticator

  2. Setup your OAuth tokens in Github via https://github.com/settings/developers

    • Select "Register a New Application"
    • Make sure you fill out the callback URL as https://<yourdomain.org>/hub/oauth_callback (use http is you don't have SSL enabled)
    • Once registered note the Client ID and Client Secret
  3. Edit run/env.sh and enter GITHUB_CLIENT_SECRET, GITHUB_CLIENT_ID and OAUTH_CALLBACK_URL from above

  4. Edit the Jupyterhub config run/jupyterhub_config.py as needed. You may need to adjust values for if you wish to run with SSL:

    c.JupyterHub.port = 443
    
    c.JupyterHub.ssl_cert = '/path/to/cert'
    c.JupyterHub.ssl_key = '/path/to/key'

    You may also adjust values for the shared directory from /tmp to your shared volume:

    c.DockerSpawner.volumes = {
        '/tmp': '/wkshp_shared'
    }
  5. Add initial users to run/userlist

Run

If you have set appropriate SSL certs above you can leave off the --no-ssl below:

cd run
./run.sh --no-ssl

mp-jupyterhub's People

Contributors

shreddd avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.