Install jupyterhub extension for jupyterlab

This commit is contained in:
yuvipanda
2018-08-13 15:36:20 -06:00
parent 7539c5d946
commit 8f966ce8c9

View File

@@ -154,6 +154,20 @@ def ensure_jupyterhub_service(prefix):
systemd.enable_service('traefik') systemd.enable_service('traefik')
def ensure_jupyterlab_extensions():
"""
Install the JupyterLab extensions we want.
"""
extensions = [
'@jupyterlab/hub-extension'
]
subprocess.check_output([
os.path.join(USER_ENV_PREFIX, 'bin/jupyter'),
'labextension',
'install'
] + extensions)
def ensure_jupyterhub_package(prefix): def ensure_jupyterhub_package(prefix):
""" """
Install JupyterHub into our conda environment if needed. Install JupyterHub into our conda environment if needed.
@@ -403,6 +417,7 @@ def main():
ensure_jupyterhub_package(HUB_ENV_PREFIX) ensure_jupyterhub_package(HUB_ENV_PREFIX)
ensure_chp_package(HUB_ENV_PREFIX) ensure_chp_package(HUB_ENV_PREFIX)
ensure_config_yaml(pm) ensure_config_yaml(pm)
ensure_jupyterlab_extensions()
ensure_jupyterhub_service(HUB_ENV_PREFIX) ensure_jupyterhub_service(HUB_ENV_PREFIX)
ensure_jupyterhub_running() ensure_jupyterhub_running()
ensure_symlinks(HUB_ENV_PREFIX) ensure_symlinks(HUB_ENV_PREFIX)