From T3_KR_KNU
Jump to: navigation, search
(pip를 이용하여 사용자 커널 추가)
(conda를 이용하여 사용자 커널 추가)
Line 77: Line 77:
 
  $ . /opt/anaconda3/anaconda3.sh
 
  $ . /opt/anaconda3/anaconda3.sh
  
* 가상환경 추가 및 패키지 설치
+
* 가상환경 추가 및 패키지 설치 (가상환경이름: ipykernel_py3.7)
  
  $ conda create -n ipykernel_py3.7 python=3.7 ipykernel
+
  $ conda create -n ''ipykernel_py3.7'' python=3.7 ipykernel
  $ conda activate ipykernel_py3.7
+
  $ conda activate ''ipykernel_py3.7''
  $ conda install -c conda-forge matplotlib
+
  $ conda install -c conda-forge ''matplotlib''
  
* 커널 추가
+
* 커널 추가 (커널이름: python3.7, 메뉴표시이름: Python(3.7))
$ conda activate ipykernel_py3.7
+
  $ ipython kernel install --user --name ''python3.7'' --display-name "Python(3.7)"
  $ ipython kernel install --user --name python3.7 --display-name "Python(3.7)"
+
  
 
* 커널 조회
 
* 커널 조회
Line 91: Line 90:
  
 
* 커널 삭제
 
* 커널 삭제
  $ jupyter kernelspec uninstall 커널이름
+
  $ jupyter kernelspec uninstall "python3.7"
  
 
=== HTCondor Python API ===
 
=== HTCondor Python API ===

Revision as of 04:50, 18 March 2022

1 JupyterHub

1.1 소개

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

1.2 커널

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

1.2.1 기본 제공 커널

1.2.1.1 Python 3
  • python 3.9.7
1.2.1.2 Python 2.7
  • python 2.7.15
  • htcondor api 8.9.5
  • matplotlib 2.2.5
  • numpy 1.16.5
1.2.1.3 Python 3.6
  • python 3.6.13
  • root 6.24.2
  • htcondor 9.1.2
  • matplotlib 3.3.4
  • numpy 1.19.5
1.2.1.4 Python 3.6 (PyROOT)
  • python 3.6.7
  • root 6.20.2
  • matplotlib 3.3.4
  • numpy 1.18.1
1.2.1.5 Python 3.7 (TF_CPU)
  • python 3.7.12
  • tensorflow 2.7.0
  • matplotlib 3.5.1
  • numpy 1.21.5

1.2.2 사용자 커널 추가하기

  • 기본 제공 커널에서 사용자가 원하는 패키지가 없거나 특정한 버전의 패키지가 필요하다면 자신이 원하는 구성으로 사용자 커널을 추가할 수 있습니다.
1.2.2.1 pip를 이용하여 사용자 커널 추가
  • ananconda3 환경설정 로딩
$ . /opt/anaconda3/anaconda3.sh
  • 가상환경 추가 및 패키지 설치, (가상환경 이름: ipykernel_py3.7)
$ virtualenv ipykernel_py3.7 --python=3.7
$ source ipykernel_py3.7/bin/activate
$ pip install  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
1.2.2.2 conda를 이용하여 사용자 커널 추가
  • ananconda3 환경설정 로딩
$ . /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"

1.3 HTCondor Python API

1.4 PyROOT

1.5 tensorflow

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