Coder Social home page Coder Social logo

yoh1496 / jupyterhub-docker-gpu-gitlab Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aptpod/jupyterhub-docker-gpu-gitlab

0.0 1.0 0.0 17 KB

License: BSD 3-Clause "New" or "Revised" License

Makefile 8.09% Python 27.10% Dockerfile 30.49% Shell 34.33%

jupyterhub-docker-gpu-gitlab's Introduction

jupyterhub-deploy-docker

See original repository.

Authenticator setup

This deployment uses GitLab OAuth to authenticate users.

  • add variables to an oauth.env file in the secrets directory of this repository. You may need to create both the secrets directory and the oauth.env file. For example, add the following lines in the oauth.env file:

    oauth.env file

    OAUTH_CLIENT_ID=<gitlab_client_id>
    OAUTH_CLIENT_SECRET=<gitlab_client_secret>
    OAUTH_CALLBACK_URL=http://<myaddress>:8001/hub/oauth_callback
    GITLAB_HOST=https://<gitlab_address>

    Note: The oauth.env file is a special file that Docker Compose uses to lookup environment variables. If you choose to place the GitHub OAuth application settings in this file, you should make sure that the file remains private (be careful to not commit the oauth.env file with these secrets to source control).

GitLab OAuth Application

Create a GitLab OAuth application.

Database setup

  • add variables to an postgres.env file in the secrets directory of this repository.

    postgres.env file

    POSTGRES_PASSWORD=mysecretpassword

Build the JupyterHub Docker image

Finish configuring JupyterHub and then build the hub's Docker image. (We'll build the Jupyter Notebook image in the next section.)

  1. Configure userlist: Create a userlist file of authorized JupyterHub users. The list should contain GitHub usernames, and this file should designate at least one admin user. For instance, the example file below contains three users, jtyberg, jenny, and guido, and one designated administrator, jtyberg:

    userlist file

    jtyberg admin
    jenny
    guido
    

    The admin user will have the ability to add more users through JupyterHub's admin console.

  2. Use docker-compose to build the JupyterHub Docker image on the active Docker machine host by running the make build command:

    make build

Spawner: Prepare the Jupyter Notebook Image

Build and tag the image using the Dockerfile in notebook-with-gpu directory.

cd notebook-with-gpu
docker build -t jupyterhub-gpu-notebook .

Run JupyterHub

Run the JupyterHub container on the host.

To run the JupyterHub container in detached mode:

docker-compose up -d

Once the container is running, you should be able to access the JupyterHub console at

http://<myaddress>:8001

To bring down the JupyterHub container:

docker-compose down

jupyterhub-docker-gpu-gitlab's People

Watchers

 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.