Jupyter をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
本家様 [[https://jupyter.org/>+https://jupyter.org/]]
「JupyterLab」と「Jupyter Notebook」があるようです. &siz...
JupyterLab: A Next-Generation Notebook Interface
#code(nonumber){{
JupyterLab is the latest web-based interactive developmen...
Its flexible interface allows users to configure and arra...
A modular design invites extensions to expand and enrich ...
(deepL翻訳:JupyterLabは、ノートブック、コード、データの...
その柔軟なインターフェースにより、ユーザーはデータサイエ...
モジュール式の設計により、機能の拡張や充実が可能です。)
}}
Jupyter Notebook: The Classic Notebook Interface
#code(nonumber){{
The Jupyter Notebook is the original web application for ...
(deepL翻訳:Jupyter Notebookは、計算ドキュメントを作成・...
}}
***枠組み [#d30a470a]
ここでは pyenv を敷いてその上に anaconda や必要に応じて m...
&ref(2024y08m07d_005601565.png,nolink,noborder);
っで枠組みを作ります
#code(nonumber){{
[root@rockylinux9 ~]# cat /etc/redhat-release
Rocky Linux release 9.4 (Blue Onyx)
[root@rockylinux9 ~]# git clone https://github.com/yyuu/p...
[root@rockylinux9 ~]# export PYENV_ROOT=/apps/pyenv
[root@rockylinux9 ~]# export PATH=$PYENV_ROOT/bin:$PATH
[root@rockylinux9 ~]# pyenv install --list <--これでa...
[root@rockylinux9 ~]# pyenv install anaconda3-2024.06-1
[root@rockylinux9 ~]# pyenv global anaconda3-2024.06-1
[root@rockylinux9 ~]# source /apps/pyenv/versions/anacond...
[root@rockylinux9 ~]# conda env list
# conda environments:
#
base /apps/pyenv/versions/anaconda3-2...
[root@rockylinux9 ~]#
}}
この後に「conda create -n <環境名> python ..」とかで実行...
JupyterLabやJupyter Notebookはこの実行環境に「jupyterlab...
***jupyterlab [#f172c9fa]
ここでは簡単に PyTorch の実行環境を擁してそこにjupyterlab...
#code(nonumber){{
[illya@rockylinux9 ~]$ source /apps/pyenv/versions/anacon...
[illya@rockylinux9 ~]$ conda create -n pytorch-jupyterlab...
:
environment location: /home/illya/.conda/envs/pytorch-j...
:
[illya@rockylinux9 ~]$ conda activate pytorch-jupyterlab
(pytorch-jupyterlab) [illya@rockylinux9 ~]$ conda install...
[あるいは]
pip install jupyterlab
(pytorch-jupyterlab) [illya@rockylinux9 ~]$ jupyter --ver...
Selected Jupyter core packages...
IPython : 8.26.0
ipykernel : 6.29.5
ipywidgets : not installed
jupyter_client : 8.6.2
jupyter_core : 5.7.2
jupyter_server : 2.14.2
jupyterlab : 4.2.4
nbclient : 0.10.0
nbconvert : 7.16.4
nbformat : 5.10.4
notebook : not installed
qtconsole : not installed
traitlets : 5.14.3
(pytorch-jupyterlab) [illya@rockylinux9 ~]$
}}
これで PyTorch 実行環境「pytorch-jupyterlab」にjupyterlab...
使うには 実行環境「pytorch-jupyterlab」内で「jupyter lab...
#code(nonumber){{
(pytorch-jupyterlab) [illya@rockylinux9 ~]$ jupyter lab -...
Writing default config to: /home/illya/.jupyter/jupyter_l...
(pytorch-jupyterlab) [illya@rockylinux9 ~]$ vi /home/illy...
:
c.ServerApp.ip = '*'
:
(pytorch-jupyterlab) [illya@rockylinux9 ~]$
}}
その後に起動させます
#code(nonumber){{
(pytorch-jupyterlab) [illya@rockylinux9 ~]$ jupyter lab
:
To access the server, open this file in a browser:
file:///home/illya/.local/share/jupyter/runtime/j...
Or copy and paste one of these URLs:
http://localhost:8888/lab?token=27a319643edf0aa2e...
http://127.0.0.1:8888/lab?token=27a319643edf0aa2e...
:
}}
ターミナルかフォアグラウンドのままですが、ここでブラウザ...
&color(red){*};firewallが動いていたら無効にするか8888/tcp...
&ref(2024y08m11d_010822272.png,nolink,80%); &ref(2024y08m...
ブラウザ経由でアクセスして、notebookのように実行した行が...
使い終わったらターミナルでCtrl-cで抜けますかと問われ、[y]...
一台の計算機を個人で使用するならいいですが、複数人で使う...
***Jupyter Notebook [#xd1dfcb5]
ほぼほぼ jupyterlab でいいような気がしますが、こちらも。
すでにjupyterlabが入っている実行環境「pytorch-jupyterlab...
#code(nonumber){{
(pytorch-jupyterlab) [illya@rockylinux9 ~]$ conda install...
(pytorch-jupyterlab) [illya@rockylinux9 ~]$ jupyter --ver...
Selected Jupyter core packages...
IPython : 8.26.0
ipykernel : 6.29.5
ipywidgets : not installed
jupyter_client : 8.6.2
jupyter_core : 5.7.2
jupyter_server : 2.14.2
jupyterlab : 4.2.4
nbclient : 0.10.0
nbconvert : 7.16.4
nbformat : 5.10.4
notebook : 7.2.1
qtconsole : not installed
traitlets : 5.14.3
(pytorch-jupyterlab) [illya@rockylinux9 ~]$
}}
っと「notebook」のこうもくが埋まりました。っで起動します....
#code(nonumber){{
(pytorch-jupyterlab) [illya@rockylinux9 ~]$ jupyter noteb...
:
To access the server, open this file in a browser:
file:///home/illya/.local/share/jupyter/runtime/j...
Or copy and paste one of these URLs:
http://localhost:8888/tree?token=a3899221f7fc5994...
http://127.0.0.1:8888/tree?token=a3899221f7fc5994...
:
}}
これも「jupyterlab」と同じにブラウザでアクセスするのです...
&ref(2024y08m11d_014352525.png,nolink,80%);
先ほどテストしたときに柵瀬資された「Untitledipynb」ファイ...
&ref(2024y08m11d_014517621.png,nolink,80%);
IPythonの進化系って感じです。より高機能のJupyterLabでいい...
***めも [#ka04e44b]
ブラウザで操作するものなので、基本自分のmacOS/windows(WSL...
大きい計算機で利用する手もあるけど、その際はport占有の許...
終了行:
本家様 [[https://jupyter.org/>+https://jupyter.org/]]
「JupyterLab」と「Jupyter Notebook」があるようです. &siz...
JupyterLab: A Next-Generation Notebook Interface
#code(nonumber){{
JupyterLab is the latest web-based interactive developmen...
Its flexible interface allows users to configure and arra...
A modular design invites extensions to expand and enrich ...
(deepL翻訳:JupyterLabは、ノートブック、コード、データの...
その柔軟なインターフェースにより、ユーザーはデータサイエ...
モジュール式の設計により、機能の拡張や充実が可能です。)
}}
Jupyter Notebook: The Classic Notebook Interface
#code(nonumber){{
The Jupyter Notebook is the original web application for ...
(deepL翻訳:Jupyter Notebookは、計算ドキュメントを作成・...
}}
***枠組み [#d30a470a]
ここでは pyenv を敷いてその上に anaconda や必要に応じて m...
&ref(2024y08m07d_005601565.png,nolink,noborder);
っで枠組みを作ります
#code(nonumber){{
[root@rockylinux9 ~]# cat /etc/redhat-release
Rocky Linux release 9.4 (Blue Onyx)
[root@rockylinux9 ~]# git clone https://github.com/yyuu/p...
[root@rockylinux9 ~]# export PYENV_ROOT=/apps/pyenv
[root@rockylinux9 ~]# export PATH=$PYENV_ROOT/bin:$PATH
[root@rockylinux9 ~]# pyenv install --list <--これでa...
[root@rockylinux9 ~]# pyenv install anaconda3-2024.06-1
[root@rockylinux9 ~]# pyenv global anaconda3-2024.06-1
[root@rockylinux9 ~]# source /apps/pyenv/versions/anacond...
[root@rockylinux9 ~]# conda env list
# conda environments:
#
base /apps/pyenv/versions/anaconda3-2...
[root@rockylinux9 ~]#
}}
この後に「conda create -n <環境名> python ..」とかで実行...
JupyterLabやJupyter Notebookはこの実行環境に「jupyterlab...
***jupyterlab [#f172c9fa]
ここでは簡単に PyTorch の実行環境を擁してそこにjupyterlab...
#code(nonumber){{
[illya@rockylinux9 ~]$ source /apps/pyenv/versions/anacon...
[illya@rockylinux9 ~]$ conda create -n pytorch-jupyterlab...
:
environment location: /home/illya/.conda/envs/pytorch-j...
:
[illya@rockylinux9 ~]$ conda activate pytorch-jupyterlab
(pytorch-jupyterlab) [illya@rockylinux9 ~]$ conda install...
[あるいは]
pip install jupyterlab
(pytorch-jupyterlab) [illya@rockylinux9 ~]$ jupyter --ver...
Selected Jupyter core packages...
IPython : 8.26.0
ipykernel : 6.29.5
ipywidgets : not installed
jupyter_client : 8.6.2
jupyter_core : 5.7.2
jupyter_server : 2.14.2
jupyterlab : 4.2.4
nbclient : 0.10.0
nbconvert : 7.16.4
nbformat : 5.10.4
notebook : not installed
qtconsole : not installed
traitlets : 5.14.3
(pytorch-jupyterlab) [illya@rockylinux9 ~]$
}}
これで PyTorch 実行環境「pytorch-jupyterlab」にjupyterlab...
使うには 実行環境「pytorch-jupyterlab」内で「jupyter lab...
#code(nonumber){{
(pytorch-jupyterlab) [illya@rockylinux9 ~]$ jupyter lab -...
Writing default config to: /home/illya/.jupyter/jupyter_l...
(pytorch-jupyterlab) [illya@rockylinux9 ~]$ vi /home/illy...
:
c.ServerApp.ip = '*'
:
(pytorch-jupyterlab) [illya@rockylinux9 ~]$
}}
その後に起動させます
#code(nonumber){{
(pytorch-jupyterlab) [illya@rockylinux9 ~]$ jupyter lab
:
To access the server, open this file in a browser:
file:///home/illya/.local/share/jupyter/runtime/j...
Or copy and paste one of these URLs:
http://localhost:8888/lab?token=27a319643edf0aa2e...
http://127.0.0.1:8888/lab?token=27a319643edf0aa2e...
:
}}
ターミナルかフォアグラウンドのままですが、ここでブラウザ...
&color(red){*};firewallが動いていたら無効にするか8888/tcp...
&ref(2024y08m11d_010822272.png,nolink,80%); &ref(2024y08m...
ブラウザ経由でアクセスして、notebookのように実行した行が...
使い終わったらターミナルでCtrl-cで抜けますかと問われ、[y]...
一台の計算機を個人で使用するならいいですが、複数人で使う...
***Jupyter Notebook [#xd1dfcb5]
ほぼほぼ jupyterlab でいいような気がしますが、こちらも。
すでにjupyterlabが入っている実行環境「pytorch-jupyterlab...
#code(nonumber){{
(pytorch-jupyterlab) [illya@rockylinux9 ~]$ conda install...
(pytorch-jupyterlab) [illya@rockylinux9 ~]$ jupyter --ver...
Selected Jupyter core packages...
IPython : 8.26.0
ipykernel : 6.29.5
ipywidgets : not installed
jupyter_client : 8.6.2
jupyter_core : 5.7.2
jupyter_server : 2.14.2
jupyterlab : 4.2.4
nbclient : 0.10.0
nbconvert : 7.16.4
nbformat : 5.10.4
notebook : 7.2.1
qtconsole : not installed
traitlets : 5.14.3
(pytorch-jupyterlab) [illya@rockylinux9 ~]$
}}
っと「notebook」のこうもくが埋まりました。っで起動します....
#code(nonumber){{
(pytorch-jupyterlab) [illya@rockylinux9 ~]$ jupyter noteb...
:
To access the server, open this file in a browser:
file:///home/illya/.local/share/jupyter/runtime/j...
Or copy and paste one of these URLs:
http://localhost:8888/tree?token=a3899221f7fc5994...
http://127.0.0.1:8888/tree?token=a3899221f7fc5994...
:
}}
これも「jupyterlab」と同じにブラウザでアクセスするのです...
&ref(2024y08m11d_014352525.png,nolink,80%);
先ほどテストしたときに柵瀬資された「Untitledipynb」ファイ...
&ref(2024y08m11d_014517621.png,nolink,80%);
IPythonの進化系って感じです。より高機能のJupyterLabでいい...
***めも [#ka04e44b]
ブラウザで操作するものなので、基本自分のmacOS/windows(WSL...
大きい計算機で利用する手もあるけど、その際はport占有の許...
ページ名:
1