码迷,mamicode.com
首页 > 其他好文 > 详细

tensorflow 安装

时间:2018-03-08 22:05:40      阅读:254      评论:0      收藏:0      [点我收藏+]

标签:人工智能   深度学习   

先确保老版本docker都卸载了

$ sudo yum remove docker \ docker-common \ docker-selinux \ docker-engine

技术分享图片

好久没开虚拟机了,我先更新下repo

技术分享图片

更新下工具和device mapping

$ sudo yum install -y yum-utils \ device-mapper-persistent-data \ lvm2

技术分享图片

技术分享图片

技术分享图片

搞定

添加docker的安装源repo

$ sudo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo

技术分享图片

可以把配置管理的测试模式打开

$ sudo yum-config-manager --enable docker-ce-edge

$ sudo yum-config-manager --enable docker-ce-test

$ sudo yum-config-manager --disable docker-ce-edge

技术分享图片

开始安装了

$ sudo yum install docker-ce

技术分享图片

49M

技术分享图片

技术分享图片

看看GPG key对不对,如果你是第一次安装

060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35

技术分享图片

启动docker

$ sudo systemctl start docker

技术分享图片

$ sudo docker run hello-world

感觉好像失败了

技术分享图片

看看服务

技术分享图片

先停一下服务

技术分享图片

再起来

技术分享图片

看下端口 ,都起来了

netstat -ano | grep dock

技术分享图片

docker run hello-world

技术分享图片

还是有报错,错误看起来是停止的时候出错,正常情况下应该是如下信息,我先略过了

$ docker run hello-world Hello from Docker! This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps: ...(snipped)...

看下docker 容器是否有hello world 运行

docker ps -ls

技术分享图片

总结,可以看出docker的命令一般为?

[sudo] docker [subcommand] [flags] [arguments]?

centos 的很多资源在国内被墙,忍无可忍换了ubunto,搞定hello world

SET UP THE REPOSITORY

Update the apt package index:

$ sudo apt-get update

Install packages to allow apt to use a repository over HTTPS:

$ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ software-properties-common

Add Docker’s official GPG key:

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Verify that you now have the key with the fingerprint9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.

$ sudo apt-key fingerprint 0EBFCD88 pub 4096R/0EBFCD88 2017-02-22 Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 uid Docker Release (CE deb) <docker@docker.com> sub 4096R/F273FCD8 2017-02-22

INSTALL DOCKER CE

Update the apt package index.

$ sudo apt-get update

Install the latest version of Docker CE, or go to the next step to install a specific version. Any existing installation of Docker is replaced.

$ sudo apt-get install docker-ce

技术分享图片

跑一个tensorflow在docker容器中试试看,本地没有,下载中

技术分享图片

3个小时候终于下载完成

技术分享图片

localhost 访问失败,本地连接怎么可能有错,转念一想是虚拟机有ip的

http://localhost:8888/?token=3ebe80b2f599ab18fbb52da208407e11f0fed6aa738feeba

访问正常

http://192.168.209.131:8888/tree

技术分享图片

看下容器内

技术分享图片

至此安装成功

tensorflow 安装

标签:人工智能   深度学习   

原文地址:http://blog.51cto.com/433266/2084385

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!