change nodejs to 18 and all install nglview

This commit is contained in:
2024-05-26 23:52:38 +08:00
parent 03e1542842
commit 25f494b3a8
3 changed files with 46 additions and 21 deletions

View File

@@ -10,6 +10,19 @@ c = get_config() # noqa: F821
# avoid having to rebuild the JupyterHub container every time we change a
# configuration parameter.
# from dockerspawner import DockerSpawner
# class MyDockerSpawner(DockerSpawner):
# def start(self):
# # 启动父类的start方法
# self.user_options['environment']['JUPYTER_ENABLE_NBEXTENSIONS'] = 'true'
# self.user_options['cmd'] = [
# 'bash',
# '-c',
# 'pip install nglview jupyter_packaging -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com && jupyter nbextension enable nglview --py --sys-prefix && jupyter labextension install nglview-js-widgets && jupyter labextension install @jupyter-widgets/jupyterlab-manager && start-singleuser.sh'
# ]
# return super().start()
# Spawn single-user servers as Docker containers
c.JupyterHub.spawner_class = "dockerspawner.DockerSpawner"