๋ฐ์ํ
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
apt ์์ markupsafe ์ญ์
sudo -H pip3 install jinja2
ํ๊ณ ํด๊ฒฐ..
ํฌํธํฌ์๋ฉ
ํฌํธํฌ์๋ฉ
- 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
https://yorublog.tistory.com/65
๋ฐ์ํ
'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 |