tensorflow 安装
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tensorflow 安装相关的知识,希望对你有一定的参考价值。
先确保老版本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) <[email protected]> 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 安装的主要内容,如果未能解决你的问题,请参考以下文章