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

View File

@@ -14,15 +14,13 @@ starts.
from tljh import conda from tljh import conda
import os 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.spawner_class = 'systemdspawner.SystemdSpawner'
c.JupyterHub.authenticator_class = 'dummyauthenticator.DummyAuthenticator' c.JupyterHub.authenticator_class = 'dummyauthenticator.DummyAuthenticator'
here = os.getcwd() c.SystemdSpawner.extra_paths = [os.path.join(USER_ENV_PREFIX, 'bin')]
user_environment_prefix = os.path.join(here, 'user-environment')
conda.ensure_conda_env(user_environment_prefix)
conda.ensure_conda_packages(user_environment_prefix, ['notebook', 'jupyterhub'])
c.SystemdSpawner.extra_paths = [os.path.join(user_environment_prefix, 'bin')]
c.SystemdSpawner.use_sudo = True c.SystemdSpawner.use_sudo = True
c.SystemdSpawner.dynamic_users = True