mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Move jupyterhub_config.py inside the package
This is where it's referred to from the systemd package
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user