Chinaunix

标题: mac 安装docker 和tensorflow [打印本页]

作者: hadskyd    时间: 2017-06-11 14:57
标题: mac 安装docker 和tensorflow
参考官方说明安装docker
1.https://docs.docker.com/engine/installation/
mac参考:https://docs.docker.com/docker-for-mac/
上面的链接里有安装和使用说明按照步骤一步步做就可以


2.https://www.tensorflow.org/install/install_mac
这里选择了用docker方式安装tf

3.测试
通过docker容器启动tf
# docker run -it -p 8888:8888 gcr.io/tensorflow/tensorflow:latest-devel




通过python执行测试Run a short TensorFlow program
Invoke python from your shell as follows:


$ python
Enter the following short program inside the python interactive shell:



>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
If the system outputs the following, then you are ready to begin writing TensorFlow programs:


Hello, TensorFlow!





欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2