Move jupyterhub_config.py inside the package

This is where it's referred to from the systemd package
This commit is contained in:
yuvipanda
2018-06-26 18:36:42 -07:00
parent 4ec145f9b8
commit 4042288e91

26
tljh/jupyterhub_config.py Normal file
View File

@@ -0,0 +1,26 @@
"""
JupyterHub config for the littlest jupyterhub.
This is run on startup & restarts. This file has the following
responsibilities:
1. Set up & maintain user conda environment
2. Configure JupyterHub from YAML file
This code will run as an unprivileged user, but with unlimited
sudo access. Code here can block, since it all runs before JupyterHub
starts.
"""
from tljh import conda
import os
INSTALL_PREFIX = os.environ.get('TLJH_INSTALL_PREFIX', '/opt/tljh')
USER_ENV_PREFIX = os.path.join(INSTALL_PREFIX, 'user')
c.JupyterHub.spawner_class = 'systemdspawner.SystemdSpawner'
c.JupyterHub.authenticator_class = 'dummyauthenticator.DummyAuthenticator'
c.SystemdSpawner.extra_paths = [os.path.join(USER_ENV_PREFIX, 'bin')]
c.SystemdSpawner.use_sudo = True
c.SystemdSpawner.dynamic_users = True