Giter Site home page Giter Site logo

juphub_hello's Introduction

juphub_hello

These instructions were tested on a Linux machine. It is preferred. They did not work on my Mac ...

Install Jupyter Using Miniconda

conda create --name dockstore-jupyterhub python=3.10
conda install -c conda-forge nodejs
conda upgrade -c conda-forge nodejs
npm install -g configurable-http-proxy
pip3 install jupyterhub==2.3.1
pip3 install oauthenticator==15.0.1
pip3 install jupyter-client==7.3.4
pip3 install jupyterlab==3.4.3

# This docker spawner allows for image to be specifed in in the url
git clone https://github.com/abessiari/dockerspawner.git -b dockstore
cd dockerspawner/
pip3 install -e .

# Generate config file or use the sample jupyterhub_config.py from this repo
# jupyterhub --generate-config -f jupyterhub_config.py 
# You need to configure the hub ip. It needs to be public 
c.JupyterHub.hub_ip = 'XXX.XXX.XXX.XXX'

# GUTHUB OAUTH For this callback to work: use 'ssh -L 8000:HUB_PUBLIC_IP:8000 username@HUB_PUBLIC_IP'
c.GitHubOAuthenticator.oauth_callback_url = 'http://localhost:8000/hub/oauth_callback'
c.GitHubOAuthenticator.client_id = 'XXX'
c.GitHubOAuthenticator.client_secret = 'XXX'


# Default image. 
c.DockerSpawner.image = 'jupyterhub/singleuser:2.3.0'

sudo ~/miniconda3/envs/dockstore-jupyterhub/bin/jupyterhub -f jupyterhub_config.py

Build image

This is the image that will be passed in the uri. Dockerhub will try to pull it. So it needs to be built locally where the hub resides. No need to push it to dockerhub.

git clone https://github.com/abessiari/juphub_hello.git

cd juphub_hello
docker build -t juphub-hello:main .
docker image list # make sure you see your image

Access Notebook

Modify SOME_USER with your username

Using browser acces at http://localhost:8000/user/SOME_USER/lab/tree/hello.ipynb?image=juphub-hello:main

Trouble

If any trouble you may want cleanup and then restart jupyterhub

rm -rf jupyterhub.sqlite jupyterhub_cookie_secret 
docker ps -a
docker rm -f jupyter-your-user-name

Dockstore

See jupyterhub branch at https://github.com/abessiari/dockstore/tree/jupyterhub and https://github.com/abessiari/dockstore-ui2/tree/jupyterhub

juphub_hello's People

Contributors

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