TensorFlow镜像的引入

来自CloudWiki
跳转至: 导航搜索

准备工作

引入TensorFlow镜像

导入镜像到docker中:

docker load < docker.tar

查看docker镜像id

maxin@maxin-virtual-machine:~$ sudo docker images
[sudo] password for maxin:
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
hello-world         latest              2cb0d9787c4d        11 days ago         1.85kB
centos              latest              49f7960eb7e4        6 weeks ago         200MB
<none>              <none>              5ec62b0b2bdd        16 months ago       6.57GB

找到对应的image id,如上图中那个6G镜像所对应的ID号。

标记镜像,

docker tag IMAGE_ID ra_image

运行镜像:

maxin@maxin-virtual-machine:~$ sudo docker run -it ra_image
root@4c9625188f39:~# ls
root@4c9625188f39:~# cd /
root@4c9625188f39:/# ls
android  boot  home   media  proc  run_jupyter.sh  sys         usr
bazel    dev   lib    mnt    root  sbin            tensorflow  var
bin      etc   lib64  opt    run   srv             tmp
root@4c9625188f39:/# ll tensorflow
total 192
drwxr-xr-x 1 root root  4096 Feb 21  2017 ./
drwxr-xr-x 1 root root  4096 Jul 22 00:16 ../
drwxr-xr-x 1 root root  4096 Mar  1  2017 .git/
-rw-r--r-- 1 root root   245 Feb 11  2017 .gitignore
-rw-r--r-- 1 root root     0 Feb 11  2017 .gitmodules
-rw-r--r-- 1 root root   265 Feb 11  2017 .mention-bot
-rw-r--r-- 1 root root  2219 Feb 11  2017 ACKNOWLEDGMENTS
-rw-r--r-- 1 root root   542 Feb 11  2017 ADOPTERS.md
-rw-r--r-- 1 root root   347 Feb 11  2017 AUTHORS
-rw-r--r-- 1 root root     0 Feb 11  2017 BUILD
-rw-r--r-- 1 root root  1749 Feb 11  2017 CONTRIBUTING.md
-rw-r--r-- 1 root root  1380 Feb 11  2017 ISSUE_TEMPLATE.md
-rw-r--r-- 1 root root 11416 Feb 11  2017 LICENSE
-rw-r--r-- 1 root root  8235 Feb 11  2017 README.md
-rw-r--r-- 1 root root 36494 Feb 11  2017 RELEASE.md
-rw-r--r-- 1 root root 14860 Feb 21  2017 WORKSPACE
lrwxrwxrwx 1 root root   107 Feb 11  2017 bazel-bin -> /root/.cache/bazel/_bazel                                                                             _root/68a62076e91007a7908bc42a32e4cff9/execroot/tensorflow/bazel-out/local-opt/b                                                                             in/
lrwxrwxrwx 1 root root   112 Feb 11  2017 bazel-genfiles -> /root/.cache/bazel/_                                                                             bazel_root/68a62076e91007a7908bc42a32e4cff9/execroot/tensorflow/bazel-out/local-                                                                             opt/genfiles/
lrwxrwxrwx 1 root root    97 Feb 11  2017 bazel-out -> /root/.cache/bazel/_bazel                                                                             _root/68a62076e91007a7908bc42a32e4cff9/execroot/org_tensorflow/bazel-out/
lrwxrwxrwx 1 root root    87 Feb 11  2017 bazel-tensorflow -> /root/.cache/bazel                                                                             /_bazel_root/68a62076e91007a7908bc42a32e4cff9/execroot/org_tensorflow/
lrwxrwxrwx 1 root root   112 Feb 11  2017 bazel-testlogs -> /root/.cache/bazel/_                                                                             bazel_root/68a62076e91007a7908bc42a32e4cff9/execroot/tensorflow/bazel-out/local-                                                                             opt/testlogs/
-rw-r--r-- 1 root root 12791 Feb 11  2017 bower.BUILD
-rwxr-xr-x 1 root root 17755 Feb 11  2017 configure*
-rw-r--r-- 1 root root   328 Feb 11  2017 models.BUILD
drwxr-xr-x 1 root root  4096 Feb 11  2017 tensorflow/
drwxr-xr-x 1 root root  4096 Feb 11  2017 third_party/
drwxr-xr-x 1 root root  4096 Feb 11  2017 tools/
drwxr-xr-x 1 root root  4096 Feb 11  2017 util/
root@4c9625188f39:/#

返回 人工智能