보르헤스의 지도
Ubuntu iPython notebook server 외부 접근 가능하게 만들기 본문
ipython notebook을 외부에서 원격으로 사용하는 것은 좀 위험함.
공인 ip에서 이 짓을 하면 미친 짓임..
그래도 급할 경우를 위해 해보면..
jupyter notebook --generate-config
이렇게 하면 config 파일 생성됨
Writing default config to: ~/.jupyter/jupyter_notebook_config.py
패스워드 만들기
ipython 실행 후
In [1]: from notebook.auth import passwd In [2]: passwd() Enter password: Verify password:
하면 hash key 생성.. 이것을 복사
닫고 위의 jupyter_notebook_config.py 파일을 열고 다음을 입력
c = get_config() c.NotebookApp.password = u'/hash키 복사된 것/'
ssl을 사용하고 싶으면
openssl을 이용해 365일 유효한 키를 만든다.
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem
설정파일에서 다음 항목을 고친다.
c.NotebookApp.certfile = u'/absolute/path/to/your/certificate/mycert.pem'
설정파일에서 서버를 다음과 같이 설정
# The IP address the notebook server will listen on. # c.NotebookApp.ip = 'localhost' c.NotebookApp.ip = '내 ip' # c.NotebookApp.port_retries = 50 c.NotebookApp.port_retries = 8888
또는 다음 명령어로도 수행 가능
jupyter notebook --ip=* --no-browser
기타 설정
#실행과 동시에 web-browser를 실행하지 않게 한다.
c.NotebookApp.open_browser = False
c.NotebookApp.matplotlib='inline'
옵션은 사용하지 못하도록 변경되었다.
IPython shell에서 직접 magic 함수를 이용해야 한다.
%matplotlib inline
아래 사이트 참고했음.
http://goodtogreate.tistory.com/entry/IPython-Notebook-설치방법
'시스템 및 설정' 카테고리의 다른 글
jupyter notebook portforwarding (0) | 2019.04.03 |
---|---|
slurm 간단 tip (0) | 2017.12.05 |
google cloud의 GPU로 jupyter notebook 구동하기 (0) | 2017.08.21 |
레거시 장비를 위한 CUDA 6.5 설치 (0) | 2016.02.01 |
Ubuntu rpy2 installation (0) | 2016.02.01 |