Ubuntu 환경에서 jupyter notebook 외부접속 설정

InfinityLoop·2020년 5월 26일
0

Ubuntu 사용하기

목록 보기
1/3

anaconda 설치

$ cd ~
$ wget https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh
$ bash Anaconda3-2020.02-Linux-x86_64.sh
$ source ~/.bashrc

jupyter 설정 파일 추가

$ jupyter notebook --generate-config

암호화 된 password 생성

$ ipython
ln [1]: from notebook.auth import passwd
ln [2]: passwd()
Enter password:    # password 입력
Verify password:    # password 재입력
Out[2]: 'sha1:a1s2d3f4...'    # password 암호화
In[3]: exit()

jupyter 설정 파일 수정

$ vim ~/.jupyter/jupyter_notebook_config.py
line 048 : c.NotebookApp.allow_origin = '*'
line 204 : c.NotebookApp.ip = '10.0.2.15'
line 266 : c.NotebookApp.notebook_dir = u'/home/{username}/jupyter-workspace'
line 272 : c.NotebookApp.open_browser = False
line 281 : c.NotebookApp.password = u'sha1:a1s2d3f4...'
line 292 : c.NotebookApp.port = 8888

workspace 폴더 생성

$ mkdir ~/jupyter-workspace

실행

$ jupyter notebook --config ~/.jupyter/jupyter_notebook_config.py

1개의 댓글

comment-user-thumbnail
2023년 2월 13일

감사합니다 ! ㅎㅎ,,, 좋은 하루 보내세요!

답글 달기