[PYTHON] Create a classroom on Jupyterhub

I've finally learned a little about Jupyterhub.

Are you using Jupyterhub, the strongest Python runtime environment?

There are Kaggle etc., but it is quite convenient if you can run Jupyterhub on your own server instance.

I was looking for an operation method on Jupyterhub, thinking that it could be used for training in the future.

Among them, I didn't know how to set ** user creation ** and ** home directory when user logs in **, so I will share it.

First, install Jupyterhub

$ pip install jupyterhub

Jupyterhub daemonization (leave it running)

#Set the host so that it can be accessed from the outside
$ nohup jupyterhub --ip=0.0.0.0 >> jupyterhub.log 2>&1 &

Create CONFIG

A file called *** jupyterhub_config.py *** will be created.

$ jupyterhub --generate-config

User whitelist settings

Only accept whitelisted usernames.

jupyterhub_config.py


c.Authenticator.whitelist = {'【username】'}

Home directory settings for each user

** Set to be variable with the user name logged in with {username} **. Set the top-level directory for each user. Don't forget to create your own directory as Jupyterhub doesn't create a user directory for you.

jupyterhub_config.py


c.Spawner.notebook_dir = '/home/【username】/jupyterhub/{username}'

Change log

--2020/01/19 Newly created

Recommended Posts

Create a classroom on Jupyterhub
Create a Python environment on Mac (2017/4)
Create a SlackBot service on Pepper
Create a Linux environment on Windows 10
Create a python environment on your Mac
Create a Linux virtual machine on Windows
[Venv] Create a python virtual environment on Ubuntu
Create a Python execution environment on IBM i
Create a Python virtual development environment on Windows
Create a GUI on the terminal using curses
Create a Django schedule
Create a Python module
Create a Python environment
Create a slack bot
Create a comfortable Python 3 (Anaconda) development environment on windows
[kotlin] Create a real-time image recognition app on android
Create a decent shell and python environment on Windows
Create a Python development environment on OS X Lion
Create a shape on the trajectory of an object
Create a Wox plugin (Python)
Create a new csv with pandas based on the local csv
Create a local pypi repository
Create a function in Python
Create a dictionary in Python
Create a Python (pyenv / virtualenv) development environment on Mac (Homebrew)
A comment on Boruta algorithm
Create a list in Python with all followers on twitter
Create a (simple) REST server
[Python] Create a linebot that draws any date on a photo
Create a VS Code + Docker development environment on a Linux VM
Create a homepage with django
Create command shortcuts on Ubuntu 16.04
Create a python numpy array
Create a dummy data file
Create a Django login screen
Create a Python script for Wake on LAN (NAT traversal Wake on LAN [5])
Create a simple textlint server
Create a directory with python
Create a virtual environment for python on mac [Very easy]
Create a rudimentary ELF packer
Create a Python environment for professionals in VS Code on Windows
I tried to create a server environment that runs on Windows 10
[MariaDB] Install MariaDB on Linux and create a DB and an operating user.
Create a word cloud with only positive / negative words on Twitter
Create a Docker container image with JRE8 / JDK8 on Amazon Linux
Building a Python environment on Mac
Create a CSV reader in Flask
Create a python GUI using tkinter
Create a DI Container in Python
Steps to create a Django project
Building a Python environment on Ubuntu
Create a pandas Dataframe from a string.
Install Arch Linux on DeskMini A300
Create a nested dictionary using defaultdict
How to create a Conda package
Create a virtual environment with Python!
Run a Linux server on GCP
Create a binary file in Python
How to create a virtual bridge
Implement a Django app on Hy
Run Matplotlib on a Docker container