docker pull tensorflow/tensorflow
注:对应的为docker.io/tensorflow/tensorflow
docker run -p 8888:8888 -p 6006:6006 tensorflow/tensorflow
启动后显示信息:
[I 06:36:59.777 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
[W 06:36:59.816 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 06:36:59.827 NotebookApp] Serving notebooks from local directory: /notebooks
[I 06:36:59.827 NotebookApp] 0 active kernels
[I 06:36:59.827 NotebookApp] The Jupyter Notebook is running at: http://[all ip addresses on your system]:8888/?token=12d770087a7668b5b0a4aecf12c437069a617bcde42de9b9
[I 06:36:59.827 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 06:36:59.827 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=12d770087a7668b5b0a4aecf12c437069a617bcde42de9b9
说明:
1、使用http://localhost:8888/?token=12d770087a7668b5b0a4aecf12c437069a617bcde42de9b9可以进行访问,因为宿主主机进行了映射端口,可以直接在8888上进行操作。
2、启动以后已经是后台服务,关闭终端后,仍然可以进行操作
交互启动
docker run -it -p 8888:8888 -p 6006:6006 tensorflow/tensorflow
后台启动
docker run –d -p 8888:8888 -p 6006:6006 tensorflow/tensorflow
注:启动后在8888端口上监听
版本说明:
见:http://stackoverflow.com/questions/34694701/tensorflow-which-docker-image-to-use
There are four images:
查看容器ip:
[root@bogon ~]# docker inspect 5eb16eb805c3 | grep IPAddress
"SecondaryIPAddresses": null,
"IPAddress": "172.17.0.2",
"IPAddress": "172.17.0.2",
查看容器端口:
[root@bogon ~]# docker port 5eb16eb805c3
6006/tcp -> 0.0.0.0:6006
8888/tcp -> 0.0.0.0:8888
[root@bogon ~]# docker logs --help
Usage: docker logs [OPTIONS] CONTAINER
Fetch the logs of a container
-f, --follow Follow log output
--help Print usage
--since Show logs since timestamp
-t, --timestamps Show timestamps
--tail=all Number of lines to show from the end of the logs
docker logs -f f2b4c9bb53dd
同tail -f的用途
docker logs – t 2b4c9bb53dd
显示日志包括所有的时间戳
docker run -p 6006:6006 tensorflow/tensorflow tensorboard --logdir=/opt/tensor
http://localhost:6006/
说明:docker中运行外部数据需要挂载外部卷来操作
#!/bin/bash setenforce 0 ifconfig | grep -w inet docker ps -l echo 按任意键继续 read -n 1 docker run -it -p 8888:8888 -p 6006:6006 -v /data/article:/article docker.io/tensorflow/tensorflow
绑定一个文件夹启动
scikit.官方例子: http://scikit-learn.org/stable/auto_examples/index.html
tensorflow例子教程 http://wiki.jikexueyuan.com/project/tensorflow-zh/
github上tensorflow例子 https://github.com/aymericdamien/TensorFlow-Examples
scikit官方api http://scikit-learn.org/stable/
机器学习之用Python从零实现贝叶斯分类器 http://python.jobbole.com/81019/
机器学习算法一般步骤 http://www.cnblogs.com/chaoren399/p/4851658.html
基于机器学习方法的POI品类推荐算法 http://tech.meituan.com/category-recommend-base-ml.html
Tensorflow学习笔记3:TensorBoard可视化学习 http://www.cnblogs.com/lienhua34/p/5998885.html