参考官方说明安装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 programInvoke python from your shell as follows:
$ pythonEnter 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!
|