@@ -102,13 +102,23 @@ setup_jupyter_extensions() {
102102setup_jupyter_hub () {
103103 # ref1: https://github.com/jupyterhub/jupyterhub
104104 # ref2: https://github.com/jupyterhub/jupyterhub/blob/main/Dockerfile
105- which npm && ( npm install -g npm configurable-http-proxy ) || ( echo " NPM not found!" && return 255 )
106-
107- pip install -Uq --pre jupyterhub \
108- && pip install -Uq oauthenticator jupyterhub-ldapauthenticator jupyterhub-kerberosauthenticator \
109- && pip install -Uq dockerspawner jupyterhub-kubespawner jupyterhub-systemdspawner wrapspawner \
110- && pip install -Uq psutil pycurl jupyter_client jupyterhub \
111- && pip install -Uq jupyterhub-traefik-proxy configurable-http-proxy
105+ # ref3: https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/main/images/hub/unfrozen/requirements.txt
106+ which npm && ( npm install -g npm configurable-http-proxy ) || ( echo " NPM not found!" && return 255 ) ;
107+
108+ pip install -Uq --pre jupyterhub jupyter_client \
109+ dockerspawner jupyterhub-kubespawner jupyterhub-systemdspawner wrapspawner \
110+ jupyterhub-ldapauthenticator jupyterhub-kerberosauthenticator \
111+ jupyterhub-firstuseauthenticator jupyterhub-hmacauthenticator jupyterhub-ltiauthenticator \
112+ jupyterhub-nativeauthenticator jupyterhub-tmpauthenticator \
113+ oauthenticator[googlegroups,mediawiki] jupyterhub-idle-culler \
114+ psycopg pymysql sqlalchemy-cockroachdb \
115+ psutil pycurl py-spy \
116+ jupyterhub-traefik-proxy ;
117+
118+ # Notes: there is also an python version of configurable-http-proxy available but has limited compatibility.
119+ ln -sf $( which configurable-http-proxy) /usr/local/bin/configurable-http-proxy ;
120+
121+ type configurable-http-proxy && echo " @ Configurable HTTP Proxy version: $( configurable-http-proxy --version) " || return -1 ;
112122
113123 type jupyterhub && echo " @ JupyterHub version: $( jupyterhub --version) " || return -1 ;
114124}
0 commit comments