python ์ค์น ํ์ํ ๊ฒฝ์ฐ
sudo apt install python3
sudo apt install python3-pip
์ค์น
pip3 install jupyterlab
Config ํ์ผ ์์ฑ
jupyter lab --generate-config
jupyter์ ์ ์ํ ๋น๋ฐ๋ฒํธ ์ค์
jupyter notebook password
์๊ฒฉ ์ค์
jupyter_lab_config.py ์์
๊ฒฝ๋ก : /home/ubuntu/.jupyter/jupyter_lab_config.py
c.ServerApp.allow_remote_access = True
c.ServerApp.ip = '0.0.0.0' # or '*' : ๋ชจ๋ ip ์ ์ ๊ฐ๋ฅ
# ์ธ๋ถ์์ jupyter ์ธํฐํ์ด์ค์ ์ฒ์ ์ ์ํ์ ๋ ๋์ค๋ ๊ฒฝ๋ก๋ฅผ ์ค์
c.NotebookApp.notebook_dir
Jupyter๋ฅผ ํญ์ ์คํ ๊ฐ๋ฅํ๋๋ก ํ๊ธฐ
sudo vim /etc/systemd/system/jupyterlab.service
์ ๋ ฅ
[Unit]
Description=Jupyter Lab Server
[Service]
ExecStart=/usr/local/bin/jupyter-lab --allow-root --config="/home/ubuntu/.jupyter/jupyter_lab_config.py"
WorkingDirectory=/home/ubuntu/jupyter
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable jupyterlab
sudo systemctl start jupyterlab
sudo systemctl status jupyterNotebook
์ค๋ฅ ๋ฐ์
- jupyter-lab: command not found on Ubuntu
export PATH="$HOME/.local/bin:$PATH"
pip install jupyterlab
# and it will work again,
https://ashley-tharp.medium.com/solved-jupyter-lab-command-not-found-on-ubuntu-820d5e97510d
[Solved] jupyter-lab: command not found on Ubuntu
How to fix this?
ashley-tharp.medium.com
apt ์์ markupsafe ์ญ์
sudo -H pip3 install jinja2
ํ๊ณ ํด๊ฒฐ..
๋ฆฌ๋ ์ค์์ Service ๋ฑ๋กํ๊ธฐ
๋ฆฌ๋ ์ค์์ ์๋์คํ์ ์ํด Service๋ฅผ ๋ฑ๋กํด๋ณด๊ฒ ๋ค. WHY? ๋จผ์ ๋ฆฌ๋ ์ค ์๋ฒ๋ ํด๋ผ์ด์ธํธ์ ๋จธ์ ์์ ๋ถํ ์ ์๋์ผ๋ก ์คํ๋๊ฒ ํ๊ณ ์ถ์ application์ด ์๊ฑฐ๋, server application์ stop, restart๋ฑ์ ์ฝ
khann.tistory.com
ํฌํธํฌ์๋ฉ
ํฌํธํฌ์๋ฉ
- OUTPUT ์ค์ ์ผ๋ก ์ธ๋ถํฌํธ 80๋ฒ์์ ๋ด๋ถ 8888๋ฒ์ผ๋ก ๋ค์ด์ค๊ฒ ์ค์ ํด๋ณธ๋ค.
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8888
ํฌํธ ํ์ธ
sudo iptables -t nat -L
iptable ์ํ ํ์ธ
์๋์ ๋ช ๋ น์ด๋ก ๋ชจ๋ ์ฒด์ธ์ ๊ท์น์ด๋ ํน์ ์ฒด์ธ์ ๊ท์น์ ์ ์ ์์ต๋๋ค.
iptables --list
iptables -L
https://m.blog.naver.com/PostView.naver?isHttpsRedirect=true&blogId=on21life&logNo=221182596171
UNIX/Linux - ๋ฆฌ๋ ์ค iptables ๋ช ๋ น์ด ํฌํธํฌ์๋ฉ ์ด๊ธฐ/๋ซ๊ธฐ *์์ ์ญ์ ์์
๋ด๋ถํฌํธ 8080์ผ๋ก ์ด์ด๋ ์๋น์ค๋ฅผ ๋ด๋ถํฌํธ 80์ผ๋ก ๋ฐ์ธ๋ฉ iptables Port forwarding ๋ฆฌ๋ ์ค(Linux)์...
blog.naver.com
iptables ๋ฐฉํ๋ฒฝ ํฌํธ ๊ด๋ฆฌ(์ด๊ธฐ/๋ซ๊ธฐ) · Story's G Blog
iptables ๋ฐฉํ๋ฒฝ ํฌํธ ๊ด๋ฆฌ(์ด๊ธฐ/๋ซ๊ธฐ) 31 Dec 2019 <!-- iwinv ์์ ์ธ์คํด์ค๋ฅผ ์์ฑํ๋ฉด ๊ด๋ฆฌ ์ฝ์์์ ๋ฐฉํ๋ณ ์ค์ ์ํ์ง ์์์ด๋ ๊ธฐ๋ณธ์ ์ผ๋ก `iptables` ๋ก ๋ฐฉํ๋ฒฝ์ด ๋์ด์์ต๋๋ค. ๊ทธ๋์ `iptables` ์
blog.storyg.co
์๊ฒฉ ์๋ฒ์์ Jupyter Notebook ๋๋ Jupyter Lab์ ์คํํ์ฌ ์ ์ํ๊ธฐ
์๊ฒฉ ์๋ฒ์์ Jupyter Notebook ๋๋ Jupyter Lab ์คํ ๋ฐ ์ ์ํ๊ธฐ ์์ ์๊ฒ ํ ๋น๋ฐ๊ฑฐ๋ ๋๋ ์์ ์ด ์ด์ ์ค์ธ ์๋ฒ๊ฐ ์๋๋ฐ, ์ด๋ฅผ ์๊ฒฉ์ผ๋ก ์ ์ํ์ฌ jupyter ํ๊ฒฝ์ ์ด์ฉํ๊ณ ์ถ์ ๋ ์ ์ฉํ ์ ์์ต
glanceyes.tistory.com
[Ubuntu 20.04] ๋ด๋ถ IP๋ฅผ ์ธ๋ถ์์ ์ ์์ด ๊ฐ๋ฅํ๋๋ก ํฌํธํฌ์๋ฉ(port forwading) ํ๊ธฐ
1. ํฌํธํฌ์๋์ ๋ฐฑ์ mkdir iptables_backup cd iptables_backup iptables-save > 2021.08.26.rule #๋ณต์ํ ๋ iptables-restore < 2021.08.26.rule 2. 80๋ฒ ํฌํธ์์ 300076ํฌํธ๋ก ํฌํธํฌ์๋ฉ iptables -A PRERO..
jmholly.tistory.com
https://yorublog.tistory.com/65
๋ผ์ฆ๋ฒ ๋ฆฌํ์ด์ ํ์ด์ฌ ๋์ค์ฝ๋ ๋ด ํธ์คํ ํ๊ธฐ
์ด ๊ธ์์๋ ๋ผ์ฆ๋ฒ ๋ฆฌํ์ด์ ๋์ค์ฝ๋ ๋ด์ ํธ์คํ ํ์ง๋ง, ์ฐ๋ถํฌ์์๋ ๊ฐ๋ฅํฉ๋๋ค. ๋ผ์ฆ๋ฒ ๋ฆฌํ์ด๊ฐ ์๊ฑฐ๋ ์ค์น๋์ด ์๋ ์๋ฒ์ปดํจํฐ(๋๋ VPS)๊ฐ ์๋ ๊ฒฝ์ฐ ์ฌ๊ธฐ๋ฅผ ๋๋ฌ VPS์ด์ ๋ฆฌ ๊ธ์์ฐธ๊ณ
yorublog.tistory.com
'Python > Jupyter' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
ubuntu / jupyter lab / flutter (2) | 2024.10.11 |
---|---|
[Python] jupyter ์์ event loop ์ค๋ฅ ๋ ๋ (0) | 2022.09.08 |
[Juyter] Tips (0) | 2022.07.19 |
[jupyter] Terminal ์์ ๊ธฐ (0) | 2020.06.01 |