Jun 3 18:07:39 castor1 jupyterhub[8182]: [E 2024-06-03 18:07:39.934 JupyterHub pages:313] Error starting server XXXX: 500 Server Error for http+docker://localhost/v1.41/containers/create?name=jupyterhub-XXXX-269-348-el.mml.tuis.ac.jp: Internal Server Error ("container create: creating container storage: the container name "jupyterhub-XXXX-269-348-el.mml.tuis.ac.jp" is already in use by 156e13cd92fbcaea275b1bfb6508fff5cd46ff923012a6cc1c587468f362ed19. You have to remove that container to be able to reuse that name: that name is already in use")
pip install requests==2.29.0
# yum install python3 # pip3 install --upgrade pip # yum install npm # npm install -g configurable-http-proxy # pip install setuptools_rust # pip install jupyterhub # pip install dockerspawner # pip install --upgrade notebook # pip install --upgrade jupyterlab # jupyterhub --version # jupyter --version # jupyter notebook --version # jupyter lab --version
(base) # conda install -c conda-forge conda==4.11.0 -y (base) # conda activate jupyterhub (jupyterhub) # conda update -c conda-forge jupyterhub -y
(jupyterhub) # jupyterhub --upgrade-db (jupyterhub) # jupyterhub -f .....
ModuleNotFoundError: No module named 'websocket'
# conda install -c conda-forge websocket-client
(base) # conda create -n jupyterhub python=3.8 -y (base) # conda activate jupyterhub (jupyterhub) # conda install -c conda-forge notebook -y (jupyterhub) # conda install -c conda-forge jupyterlab -y (jupyterhub) # conda install -c conda-forge jupyterhub==1.4.2 -y (jupyterhub) # conda install -c conda-forge voila -y (jupyterhub) # conda install jupyter_client -y (jupyterhub) # git clone https://github.com/jupyterhub/nativeauthenticator.git (jupyterhub) # pip install -e nativeauthenticator (認証モジュール:オプション) (jupyterhub) # pip install dockerspawner
curl -sL https://rpm.nodesource.com/setup_14.x | bash - yum remove nodejs npm -y yum install nodejs -y node -v
npm install -g configurable-http-proxy python3 -m pip install jupyterhub python3 -m pip install dockerspawner python3 -m pip install --upgrade notebook python3 -m pip install --upgrade jupyterlab
# docker pull jupyter/datascience-notebook # docker pull jupyter/tensorflow-notebook
# conda install -c conda-forge jupyterhub # conda install notebook
(jupyterhub)# pip install --upgrade jupyterhub-ltiauthenticator
(jupyterhub) # conda install -c conda-forge jupyterhub-ldapauthenticator -y
102 # for LDAP 103 c.JupyterHub.authenticator_class = 'ldapauthenticator.LDAPAuthenticator' 104 #c.LDAPAuthenticator.server_address = '202.26.150.*' 105 c.LDAPAuthenticator.server_address = '202.26.144.*' 106 c.LDAPAuthenticator.use_ssl = True 107 108 ## AD: template 付き(ユーザバインド) 109 c.LDAPAuthenticator.lookup_dn = False 110 c.LDAPAuthenticator.bind_dn_template = [ 111 'cn={username},ou=教員,ou=ユーザー,dc=edutuis,dc=local', 112 'cn={username},ou=学生,ou=ユーザー,dc=edutuis,dc=local' 113 ] 114 c.LDAPAuthenticator.user_search_base = 'dc=edutuis,dc=local' 115 c.LDAPAuthenticator.user_attribute = 'sAMAccountName' 116 117 ## AD: template なし 118 #c.LDAPAuthenticator.lookup_dn = True 119 #c.LDAPAuthenticator.user_search_base = 'dc=edutuis,dc=local' 120 #c.LDAPAuthenticator.user_attribute = 'sAMAccountName' 121 #c.LDAPAuthenticator.lookup_dn_search_user = 'cn=ldapauth,cn=users,dc=edutuis,dc=local' 122 #c.LDAPAuthenticator.lookup_dn_search_password = '*****' 123 #c.LDAPAuthenticator.lookup_dn_user_dn_attribute = 'cn' 124 125 ## NSL: username から dn が探せる場合(ユーザバインド) 126 #c.LDAPAuthenticator.lookup_dn = False 127 #c.LDAPAuthenticator.bind_dn_template = 'cn={username},ou=user,dc=nsl,dc=tuis,dc=ac,dc=jp' 128 129 ## NSL: ツリーを検索する場合 130 #c.LDAPAuthenticator.lookup_dn = True 131 #c.LDAPAuthenticator.user_search_base = 'ou=user,dc=nsl,dc=tuis,dc=ac,dc=jp' 132 #c.LDAPAuthenticator.user_attribute = 'uid' 133 #c.LDAPAuthenticator.lookup_dn_search_user = 'cn=Manager' 134 #c.LDAPAuthenticator.lookup_dn_search_password = '*******' 135 #c.LDAPAuthenticator.lookup_dn_user_dn_attribute = 'cn' 136
(jupyterhub) # pip --no-cache-dir install git+https://github.com/jupyterhub/dockerspawner.git or (jupyterhub) # pip install dockerspawner
(jupyterhub) # git clone https://github.com/NII-cloud-operation/CoursewareHub-LC_platform.git (jupyterhub) # cd CoursewareHub-LC_platform/jupyterhub/spawner (jupyterhub) # pip --no-cache-dir install .
# cd /etc/pki/tls # openssl req -new -newkey rsa:2048 -days 3650 -nodes -keyout private/key.pem -out server.csr # openssl x509 -in server.csr -days 3650 -req -signkey private/key.pem -out certs/server.pem # vi /usr/local/etc/jupyterhub/jupyterhub_config.py # mkdir /var/lib/jupyterhub
(base) # conda activate jupyterhub (jupyterhub) # jupyterhub -f /usr/local/etc/jupyterhub/jupyterhub_config.py
Request Failed(Internal Server Error): container create: creating container storage: the container name \".........\" is already in use by ........ You have to remove that container to be able to reuse that name: that name is already in use.
(jupyterhub) # conda uninstall jupyterhub (jupyterhub) # conda -c conda-forge install jupyterhub==1.0.0
/.cache, ~/.jupyter, ~/.local ができているので消す.