爲了遠程跑起一本書的 notebook, 有了如下的故事
https://github.com/nfmcclure/...python
yum install -r python-devel python2-pip gcc vim
mkdir -v ~/.pip && echo -e "[global]\ntimeout = 60\nindex-url = https://pypi.douban.com/simple" > ~/.pip/pip.conf
git clone https://github.com/nfmcclure/tensorflow_cookbook.git cd tensorflow_cookbook # 這裏面有 jupyter notebook pip install -r requirements.txt
jupyter notebook --generate-config
以上將會在 ~/.jupyter/ 下建立默認config 文件: jupyter_notebook_config.py
修改這個 py 文件git
c.NotebookApp.port = 8080 c.NotebookApp.ip = '你的服務器公網IP' c.NotebookApp.open_browser = False
jupyter notebook password
(nohup jupyter notebook --allow-root --ip=0.0.0.0 > deep.log &)
按兩次回車便可github
查看logvim
cat deep.log
看到 Jupyter Notebook 啓動時有以下輸出
http://0.0.0.0:8080/tree瀏覽器
複製到瀏覽器,修改了爲本身服務器的公網 IP 便可,輸入剛剛設置的密碼。服務器