tensorflow的安装与 notebook的远程登录连接

来源:互联网 发布:mac蓝牙发送文件 编辑:程序博客网 时间:2024/06/01 23:11

环境:centos7+

tensorflow的安装:

anaconda的下载地坛:使用国内中科大的镜像:http://mirrors.ustc.edu.cn/anaconda/archive/

具体安装过程参考 官网:https://www.tensorflow.org/install/install_linux#InstallingAnaconda 

简书中的:http://www.jianshu.com/p/0c4c195b02fc


记一些关键和简单的命令:

pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.3.0-cp27-none-linux_x86_64.whl

pip install tensorflow

source activate tensorflow

source deactivate tensorflow


远程访问 jupyter notebook

参考:1) http://blog.csdn.net/bitboy_star/article/details/51427306

 2)http://blog.csdn.net/dream_an/article/details/53333504

3)http://blog.csdn.net/JJwho/article/details/75098295?locationNum=1&fps=1

因本人使用 root用户,所以全出来一些奇怪的异常,可参考(3)解决。

使用root用户启动时:jupyter notebook --allow-root


jupyter notebook --certfile=/root/.jupyter/mycert.pem --keyfile /root/.jupyter/mykey.key

vim /root/.jupyter/jupyter_notebook_config.py

jupyter_notebook_config.py中的内容如下:

c.NotebookApp.certfile = u'/root/.jupyter/mycert.pem'
c.NotebookApp.keyfile = u'/root/.jupyter/mykey.key'
c.NotebookApp.ip='*'
c.NotebookApp.password = u'sha1:0ffcd****'
c.NotebookApp.open_browser = False
c.NotebookApp.port =9999
c.NotebookApp.notebook_dir = u'/root/ipython'

目录“/root/ipython”没有时要自己去创建一个,登录时使用https://romate_IP:9999   原因参考,(3)

结果如下图: