flagflag  If you want to see English page, please click "English" Button at Left.
1: 2020-08-18 (火) 20:20:25 iseki ソース 2: 2020-08-18 (火) 22:11:14 iseki ソース
Line 1: Line 1:
** JupyterHub [#mb71944e] ** JupyterHub [#mb71944e]
-- Jupyterサーバー(ユーザ認証機能つき)+- マルチユーザのための [[Jupyter]] サーバー(ユーザ認証機能つき)
- https://horomary.hatenablog.com/entry/20​19/11/09/181614 - https://horomary.hatenablog.com/entry/20​19/11/09/181614
#br #br
-*** INSTALL [#nfb5f43c] +** INSTALL [#nfb5f43c
- (base) conda create -n jupyterhub python=3.8 -y +**** main には conda を使用 [#z4c989ab
- (base) conda activate jupyterhub + (base) # conda create -n jupyterhub python=3.8 -y 
- (jupyterhub) conda install -c conda-forge notebook -y + (base) # conda activate jupyterhub 
- (jupyterhub) conda install -c conda-forge jupyterlab -y + (jupyterhub) # conda install -c conda-forge notebook -y 
- (jupyterhub) conda install -c conda-forge jupyterhub -y + (jupyterhub) # conda install -c conda-forge jupyterlab -y 
- (jupyterhub) conda install -c conda-forge voila -y + (jupyterhub) # conda install -c conda-forge jupyterhub -y 
- (jupyterhub) conda install jupyter_client -y+ (jupyterhub) # conda install -c conda-forge voila -y 
 + (jupyterhub) # conda install jupyter_client -y
- (jupyterhub) git clone https://github.com/jupyterhub/nativeauth​enticator.git + (jupyterhub) # git clone https://github.com/jupyterhub/nativeauth​enticator.git   (認証モジュール:オプション) 
- (jupyterhub) pip install -e nativeauthenticator + (jupyterhub) # pip install -e nativeauthenticator   (認証モジュール:オプション) 
- (jupyterhub) pip install dockerspawner+ (jupyterhub) # pip install dockerspawner
#br #br
-*** 設定 [#idb49705]+** 設定 [#idb49705]
- jupyterhub --generate-config を実行すると カレントディレクトリに設定ファイル ''jupyterhub_config.py'' が生成される. - jupyterhub --generate-config を実行すると カレントディレクトリに設定ファイル ''jupyterhub_config.py'' が生成される.
- 個人的には jupyterhub が /usr/local 以下にある場合は /usr/local/etc/jupyterhub 以下に置く. - 個人的には jupyterhub が /usr/local 以下にある場合は /usr/local/etc/jupyterhub 以下に置く.
 +- 設定ファイルは拡張子が .py でないと,読み込まれない場合がある?
 +#br
 +*** Authenticator Class (authenticator_class) [#g1e9cdae]
 +**** auth.DummyAuthenticator [#g40f4bb4]
 +- その名の通りダミー.認証無し.
 +- 全てのユーザを許可する.(一応パスワード入力欄は表示される)
 +#br
 +**** jupyterhub.auth.PAMAuthenticator (default) [#n3acea52]
 +- 認証に[[PAM]]を使用する.恐らくサービスは login
 +- バグあり. [[Trouble Shooting>#rf83821d]] 参照.
#br #br
-*** 実行 [#a826d7f6+**** nativeauthenticator.NativeAuthenticator [#u43dca72
- (base) conda activate jupyterhub +- 追加モジュール(オプション) 
- (jupyterhub) jupyterhub --no-ssl -f /usr/local/etc/jupyterhub/jupyterhub_con​fig.py+- 詳細は検証中 
 +#br
-**** 使用ポート [#me192c34+**** LDAP [#n1c54d11
-- 8000 +- LDap 認証用. 
-- 8081+- 書きかけ 
 +- モジュールのInstall 
 + (jupyterhub) # conda install -c conda-forge jupyterhub-ldapauthenticator -y 
 +#br 
 + 
 +*** Spawner Class (spawner_class) [#dded2dd0] 
 + 
 +**** jupyterhub.spawner.LocalProcessSpawner (default)[#ueaf7599] 
 +- サーバに各ユーザの環境でアクセスできる 
 +- 通常作業ディレクトリは /home/{username}/notebook  (notebook は設定による) 
 +#br 
 + 
 +**** jupyterhub.spawner.SimpleLocalProcessSpa​wner [#eb28d681] 
 +- 名前がややこしい 
 +- 詳細は不明(検証する気があまりない) 
 +#br 
 + 
 +**** dockerspawner.DockerSpawner [#dc30b0cf] 
 +- https://github.com/jupyterhub/dockerspaw​​ner.git 
 +- サーバでユーザ毎に [[Docker]]でNoteBook コンテナを起動して接続. 
 +- 作業ホームは /home/jovjan/work 固定(多分 Docker Image固定) 
 +- Install 
 + (jupyterhub) # pip --no-cache-dir install git+https://github.com/jupyterhub/docker​spawner.git 
 + or 
 + (jupyterhub) # pip install dockerspawner 
 +#br 
 + 
 +**** dockerspawner.SwarmSpawner [#vad945d1] 
 +- dockerspawner.DockerSpawner からの派生クラス 
 +- DockerSpawner と同じパッケージ 
 +- NoreBook コンテナを Docker-Compose で管理し,複数のサーバーのいずれかで実行できる. 
 +- 検証中 
 +#br 
 + 
 +**** niicloudoperation/jupyterhub-singleuser [#ld71d218] 
 +- https://github.com/NII-cloud-operation/C​oursewareHub-LC_platform 
 +- Document: https://github.com/nii-gakunin-cloud/ocs​-templates 
 +- NII開発.自由度低し(個人的感想).[[CoursewareHub]] 用 Spawner Class 
 +- dockerspawner.SwarmSpawner からの派生クラス 
 +- 検証中 
 +- INSTALL 
 + (jupyterhub) # git clone https://github.com/NII-cloud-operation/C​oursewareHub-LC_platform.git 
 + (jupyterhub) # cd CoursewareHub-LC_platform/jupyterhub/spa​wner/coursewareuserspawner 
 + (jupyterhub) # pip --no-cache-dir install .
#br #br
*** jovyan って誰? [#w4a21247] *** jovyan って誰? [#w4a21247]
-- Docker を使用すると,作業ディレクトリが /home/jovyan/work 固定なのだが?+- DockerSpawner を使用すると,作業ディレクトリが /home/jovyan/work 固定なのだが?
- c.DockerSpawner.notebook_dir 辺りをいじっても変化しない? - c.DockerSpawner.notebook_dir 辺りをいじっても変化しない?
 +#br
 +
 +** 実行 [#a826d7f6]
 + (base) # conda activate jupyterhub
 + (jupyterhub) # jupyterhub --no-ssl -f /usr/local/etc/jupyterhub/jupyterhub_con​fig.py
 +
 +**** 使用ポート [#me192c34]
 +- 8000
 +- 8081
#br #br
Line 40: Line 104:
*** JupyterHub: PAM使用時に 再login するとPAMの認証エラーになる. [#cec1cefc] *** JupyterHub: PAM使用時に 再login するとPAMの認証エラーになる. [#cec1cefc]
 +- 認証モジュールに jupyterhub.auth.PAMAuthenticator を使用した場合,再Loginで失敗
 +-- c.JupyterHub.authenticator_class = 'jupyterhub.auth.PAMAuthenticator'
- バグだろ. - バグだろ.
- Resolve: jupyterhub_config.py に ''c.PAMAuthenticator.open_sessions = False'' を追加する - Resolve: jupyterhub_config.py に ''c.PAMAuthenticator.open_sessions = False'' を追加する
- see: https://github.com/jupyterhub/jupyterhub​/issues/486 - see: https://github.com/jupyterhub/jupyterhub​/issues/486
#br #br


トップ   新規 ページ一覧 単語検索 最終更新   ヘルプ   最終更新のRSS 1.0 最終更新のRSS 2.0 最終更新のRSS Atom

サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 5月翌月
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
<今日>

オンライン状況

78 人のユーザが現在オンラインです。 (23 人のユーザが xpwiki を参照しています。)

登録ユーザ: 0
ゲスト: 78

もっと...

アクセスカウンタ

今日 : 1089310893108931089310893
昨日 : 7722772277227722
総計 : 2344237423442374234423742344237423442374234423742344237423442374
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com