tensorflow 安裝
$ 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 安裝