Jupyter Setting - Raidin/deeplearning-research GitHub Wiki
- Install Jupyter
$ pip install jupyter
-
Config Setting
- Default config ํ์ผ ์์ฑ
# /home/[user name]/.jupyter/ ํ์์ default config(jupyter_notebook_config.py) ํ์ผ ์์ฑ๋จ $ jupyter notebook --generate-config- Config ์์
$ cd ~/.jupyter $ vi jupyter_notebook_config.py $ ipython In [1]: from IPython.lib import passwd In [2]: passwd() Enter password: Verify password: Out[2]: '[password key]' In [3]: ^D #(^D๋ฅผ ์ ๋ ฅํ์ฌ ์ข ๋ฃ) Do you really want to exit ([y]/n)? y ######################### modify ######################### # default ip : 0.0.0.0 # localhost๋ง ์ ์ ๊ฐ๋ฅ : 127.0.0.1 c.NotebookApp.ip = โ0.0.0.0โ # ์ ์ port ์์ c.NotebookApp.port = 8888 # ์ด๊ธฐ ์คํ ์์น c.NotebookApp.notebook_dir = โ[directory path]โ # ์ต์ด ์คํ์ browser์ open ์ ๋ฌด c.NotebookApp.open_browser = False # passward์ค์ c.NotebookApp.password = '[input password key]' ########################################################## -
Background ์คํ ๋ฐฉ๋ฒ
- ์คํ ๋ช ๋ น์ด ๋ค์ "&" ๋ถ์ด๊ธฐ
# ์คํํ terminal์ข ๋ฃ์ jupyter notebook๋ ํจ๊ป ์ข ๋ฃ ๋จ $ jupyter notebook &- nohup ๋ช ๋ น์ด ์ฌ์ฉ
# ๊ธฐ๋ณธ ์ฌ์ฉ ๋ฒ # terminal ์ข ๋ฃ์์๋ ํ๋ก๊ทธ๋จ ์ข ๋ฃ ์๋จ $ nohup jupyter notebook & # "nohup.out" ํ์ผ์ด ์์ฑ๋๋ฉฐ ์ถ๋ ฅ ์ ์ฅ # ๊ฐ์ ์ข ๋ฃ ๋ฐฉ๋ฒ $ ps aux | grep jupyter $ kill -i [PID] # nohup.out ํ์ผ ์์ฑ ์ํ๊ณ ์คํํ๋ ๋ฐฉ๋ฒ $ nohup jupyter notebook >/dev/null 2>&1 & -
build kernel ์ถ๊ฐ๋ฐฉ๋ฒ
$ sudo apt-get install ipykernel
$ python -m ipykernel install --user --name [virtual env name] --display-name โ[Display name on jupyter]โ