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.
$ pip install jupyterhub
#Set the host so that it can be accessed from the outside
$ nohup jupyterhub --ip=0.0.0.0 >> jupyterhub.log 2>&1 &
A file called *** jupyterhub_config.py *** will be created.
$ jupyterhub --generate-config
Only accept whitelisted usernames.
jupyterhub_config.py
c.Authenticator.whitelist = {'【username】'}
** 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}'
--2020/01/19 Newly created
Recommended Posts