From T3_KR_KNU
Jump to: navigation, search
Hanbi (talk | contribs)
Song (talk | contribs)
 
(27 intermediate revisions by one other user not shown)
Line 20: Line 20:


* python                    2.7.15
* python                    2.7.15
* htcondor api 8.9.5
* htcondor 8.9.5
* matplotlib 2.2.5
* matplotlib 2.2.5
* numpy 1.16.5
* numpy 1.16.5


===== Python 3.6 (PyROOT) =====
===== Python 3.6 (ROOT) =====


* python                    3.6.7
* python                    3.6.13
* pyroot 6.20.2
* root                        6.24.2
* numpy 1.18.1
* htcondor                  9.1.2
* matplotlib                3.3.4
* numpy                     1.19.5


===== Python 3.7 (TF_CPU)  =====
===== Python 3.7 (TF_CPU)  =====
Line 34: Line 36:
* python                    3.7.12
* python                    3.7.12
* tensorflow                2.7.0
* tensorflow                2.7.0
* matplotlib                3.5.1
* numpy                    1.21.5
* numpy                    1.21.5
* matplotlib                3.5.1
 
===== ROOT C++ (6.24/02)  =====
 
* root                        6.24.2


==== 사용자 커널 추가하기 ====
==== 사용자 커널 추가하기 ====


* 기본 제공 커널에서 사용자가 원하는 패키지가 없거나 특정한 버전의 패키지가 필요하다면 자신이 원하는 환경으로 사용자 커널을 추가할 수 있습니다.
* 기본 제공 커널에서 사용자가 원하는 패키지가 없거나 특정한 버전의 패키지가 필요하다면 자신이 원하는 구성으로 사용자 커널을 추가할 수 있습니다.
 
* anaconda3 환경설정 로딩
 
$ . /opt/anaconda3/anaconda3.sh
 
* 가상환경 추가 및 패키지 설치 (가상환경이름: ipykernel_py3.7)
 
$ conda create -n ''ipykernel_py3.7'' python=3.7 ipykernel
$ conda activate ''ipykernel_py3.7''
$ conda install -c conda-forge ''matplotlib''
 
* 커널 추가 (커널이름: python3.7, 메뉴표시이름: Python(3.7))
$ ipython kernel install --user --name ''python3.7'' --display-name "Python(3.7)"


* 커널 조회
* 커널 조회
$ . /opt/anaconda3/anaconda3.sh
  $ jupyter kernelspec list  
  $ jupyter kernelspec list  
* 커널 추가
$ source activate other-env
$ python -m ipykernel install --user --name other-env --display-name "Python (other-env)"


* 커널 삭제
* 커널 삭제
  $ jupyter kernelspec uninstall 커널이름
  $ jupyter kernelspec uninstall "python3.7"


=== HTCondor Python API ===
=== HTCondor Python API ===
Line 60: Line 74:
* 위 문서중에 있는 [launch binder]를 클릭하면 해당 예제를 실습해볼수 있습니다.
* 위 문서중에 있는 [launch binder]를 클릭하면 해당 예제를 실습해볼수 있습니다.


=== PyROOT ===
=== ROOT ===
 
* C++ ROOT
 
TCanvas c;
TH1F h("h","ROOT Histo;X;Y",64,-4,4);
h.FillRandom("gaus");
h.Draw();
c.Draw();
 
[[File:root_c_ex1.png|700px]]


* Python ROOT
import ROOT
c = ROOT.TCanvas("c")
h = ROOT.TH1F("h","ROOT Histo;X;Y",64,-4,4)
%%cpp
h->FillRandom("gaus");
h->Draw();
c->Draw();
[[File:root_py_ex1.png|700px]]
* https://github.com/root-project/root/tree/master/bindings/jupyroot
* [https://root.cern/doc/master/group__tutorial__pyroot.html PyRoot tutorials]
* [https://root.cern/doc/master/group__tutorial__pyroot.html PyRoot tutorials]


=== tensorflow ===
=== tensorflow ===


* tensorflow gpu의 사용을 위해서는 htcondor를 이용하여 gpu 서버를 사용할 수 있습니다.
* 현재 jupyterhub에서는 tensoflow cpu 만 사용할 수 있습니다.
* tensorflow gpu의 사용을 위해서는 기존과 같이 htcondor를 이용해야합니다.
 
=== 기타 ===
 
==== 단축키 ====
* [https://ljs93kr.tistory.com/54 Jupyter notebook 단축키 정리]

Latest revision as of 06:54, 6 April 2022

JupyterHub

소개

  • jupyterhub는 jupyter notebook을 다중 사용자가 사용할 수 있도록 만들어진 환경입니다.
  • 아래 주소를 이용하여 경북대 Tier3 jupyterhub에 접속할 수 있습니다.
  • https://cms.knu.ac.kr:8000

커널

  • 노트북 커널은 노트북 문서에 포함 된 코드를 실행하는 "계산 엔진"입니다.

기본 제공 커널

Python 3
  • python 3.9.7
Python 2.7
  • python 2.7.15
  • htcondor 8.9.5
  • matplotlib 2.2.5
  • numpy 1.16.5
Python 3.6 (ROOT)
  • python 3.6.13
  • root 6.24.2
  • htcondor 9.1.2
  • matplotlib 3.3.4
  • numpy 1.19.5
Python 3.7 (TF_CPU)
  • python 3.7.12
  • tensorflow 2.7.0
  • matplotlib 3.5.1
  • numpy 1.21.5
ROOT C++ (6.24/02)
  • root 6.24.2

사용자 커널 추가하기

  • 기본 제공 커널에서 사용자가 원하는 패키지가 없거나 특정한 버전의 패키지가 필요하다면 자신이 원하는 구성으로 사용자 커널을 추가할 수 있습니다.
  • anaconda3 환경설정 로딩
$ . /opt/anaconda3/anaconda3.sh
  • 가상환경 추가 및 패키지 설치 (가상환경이름: ipykernel_py3.7)
$ conda create -n ipykernel_py3.7 python=3.7 ipykernel
$ conda activate ipykernel_py3.7
$ conda install -c conda-forge matplotlib
  • 커널 추가 (커널이름: python3.7, 메뉴표시이름: Python(3.7))
$ ipython kernel install --user --name python3.7 --display-name "Python(3.7)"
  • 커널 조회
$ jupyter kernelspec list 
  • 커널 삭제
$ jupyter kernelspec uninstall "python3.7"

HTCondor Python API

ROOT

  • C++ ROOT
TCanvas c;
TH1F h("h","ROOT Histo;X;Y",64,-4,4);
h.FillRandom("gaus");
h.Draw();
c.Draw();

  • Python ROOT
import ROOT
c = ROOT.TCanvas("c")
h = ROOT.TH1F("h","ROOT Histo;X;Y",64,-4,4)
%%cpp
h->FillRandom("gaus");
h->Draw();
c->Draw();

tensorflow

  • 현재 jupyterhub에서는 tensoflow cpu 만 사용할 수 있습니다.
  • tensorflow gpu의 사용을 위해서는 기존과 같이 htcondor를 이용해야합니다.

기타

단축키