本文共 2307 字,大约阅读时间需要 7 分钟。
$ docker pull tensorflow/tensorflowUsing default tag: latestlatest: Pulling from tensorflow/tensorflow18d680d61657: Pull complete0addb6fece63: Pull complete78e58219b215: Pull completeeb6959a66df2: Pull complete4263945a5710: Pull complete282d99d903f2: Pull completedd620fc3ae28: Pull completeaa8e48babf4b: Pull complete27c088fb1ccc: Pull completeca88730530b5: Pull complete5f530f9c7fc4: Pull complete8ea52f77069e: Pull completeDigest: sha256:ce5416e416bac281e600fa0bf3aac250514287ed31055d0d06742a4e8332dc89Status: Downloaded newer image for tensorflow/tensorflow:latest$ docker run -it tensorflow/tensorflow[I 11:53:27.774 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret[I 11:53:27.800 NotebookApp] Serving notebooks from local directory: /notebooks[I 11:53:27.800 NotebookApp] The Jupyter Notebook is running at:[I 11:53:27.800 NotebookApp] http://(fafc6c773304 or 127.0.0.1):8888/?token=3599a3d660ade03fafcfcd16165132e7c8f340585d84a3c6[I 11:53:27.800 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).[C 11:53:27.801 NotebookApp] Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://(fafc6c773304 or 127.0.0.1):8888/?token=3599a3d660ade03fafcfcd16165132e7c8f340585d84a3c6^C[I 11:53:45.354 NotebookApp] interruptedServing notebooks from local directory: /notebooks0 active kernelsThe Jupyter Notebook is running at:http://(fafc6c773304 or 127.0.0.1):8888/?token=3599a3d660ade03fafcfcd16165132e7c8f340585d84a3c6Shutdown this notebook server (y/[n])? y[C 11:53:48.680 NotebookApp] Shutdown confirmed[I 11:53:48.681 NotebookApp] Shutting down 0 kernels~$ docker run -it tensorflow/tensorflow bashroot@99a758aef080:/notebooks#root@99a758aef080:/notebooks#root@99a758aef080:/notebooks# pythonPython 2.7.12 (default, Dec 4 2017, 14:50:18)[GCC 5.4.0 20160609] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import tensorflow as tf>>> hello=tf.constant("hello world")>>> se=tf.Session()2018-12-13 11:54:48.327058: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA>>> print(se.run(hello))hello world>>>
转载地址:http://jpnmi.baihongyu.com/