vmware + ubuntu + docker+ tensorflow
来源:互联网 发布:macbook软件下载 编辑:程序博客网 时间:2024/05/21 08:48
A. 在vmware里安装ubuntu,login登录后桌面空白的问题。
查了很多资料,各种折腾。最后是通过 virtual machine settings --》hardware --》display ,右侧 取消选择 accelerate 3D graphics的复选框解决。
B. 安装docker
- 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
1.Update the apt package index:
$ sudo apt-get update
2.Install packages to allow apt to use a repository over HTTPS:
$ sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
3.Add Docker’s official GPG key:
$ gpg --import KEYS
$ sudo apt-get update
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add
Verify that the key fingerprint is 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
.
$ sudo apt-key fingerprint 0EBFCD88pub 4096R/0EBFCD88 2017-02-22 Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88uid Docker Release (CE deb) <docker@docker.com>sub 4096R/F273FCD8 2017-02-22
4.
Use the following command to set up the stable repository. You always need thestable repository, even if you want to install builds from theedge ortest repositories as well. To add the edge ortest repository, add the wordedge
ortest
(or both) after the wordstable
in the commands below.
Note: The
lsb_release -cs
sub-command below returns the name of your Ubuntu distribution, such asxenial
. Sometimes, in a distribution like Linux Mint, you might have to change$(lsb_release -cs)
to your parent Ubuntu distribution. For example, if you are usingLinux Mint Rafaela
, you could usetrusty
.
amd64:
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
如果出错,将错误信息输入检索。到一个www.digitallocean.com的网站找原语句。
5. 更新apt-get
Update the apt
package index.
$ sudo apt-get update
6. 列出所有可用docker版本
On production systems, you should install a specific version of Docker CE instead of always using the latest. This output is truncated. List the available versions.
$ apt-cache madison docker-cedocker-ce | 17.06.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages
7、安装特定版本
$ sudo apt-get install docker-ce=<VERSION>
(尖括号去掉 =号后面直接写版本名称)
8. Manage Docker as a non-root user
The docker
daemon binds to a Unix socket instead of a TCP port. By default that Unix socket is owned by the userroot
and other users can only access it usingsudo
. The docker
daemon always runs as the root
user.
If you don’t want to use sudo
when you use thedocker
command, create a Unix group calleddocker
and add users to it. When thedocker
daemon starts, it makes the ownership of the Unix socket read/writable by thedocker
group.
Warning: The
docker
group grants privileges equivalent to theroot
user. For details on how this impacts security in your system, seeDocker Daemon Attack Surface.
To create the docker
group and add your user:
Create the
docker
group.$ sudo groupadd docker
Add your user to the
docker
group.$ sudo usermod -aG docker $USER
Log out and log back in so that your group membership is re-evaluated.
If testing on a virtual machine, it may be necessary to restart the virtual machine for changes to take affect.
On a desktop Linux environment such as X Windows, log out of your session completely and then log back in.
Verify that you can run
docker
commands withoutsudo
.$ docker run hello-world
This command downloads a test image and runs it in a container. When the container runs, it prints an informational message and exits.
C. 安装tensorflow
第一次运行该命令,会先从本地查找,本地找不到后会到服务器下载docker的tensorflow镜像。
sudo docker run -it -p 8888:8888 -p 6006:6006 tensorflow/tensorflow
浏览器打开jupyter notebook http://localhost:8888/ (然后浏览器打开jupyter notebook http://localhost:8888/?token=98c3d07b555da904d2cd49b032f9d3cbb20aa2a74e681ac3 ) 6006是为tensorboard开的端口。或者
docker run -it gcr.io/tensorflow/tensorflow bash
在命令窗口中运行python指令或程序。 docker exec -i -t 6a86d814de16/bin/bash (数字ID根据具体机器上的docker container ID来定) (docker ps 查看所有镜像 )
- vmware + ubuntu + docker+ tensorflow
- Vmware + Ubuntu 16 安装Tensorflow
- 在Docker Ubuntu镜像中安装tensorflow-gpu
- VMware虚拟机上Ubuntu安装TensorFlow 1.0
- Docker TensorFlow
- TensorFlow-docker
- Ubuntu下快速安装Docker&&快速安装Tensorflow方法
- 认识Docker(vmware+centos7+docker)
- Docker部署Tensorflow
- windows docker安装 tensorflow
- Docker windows安装tensorflow
- Docker-tensorflow跑VGG16
- TensorFlow Docker一览
- TensorFlow + Docker + PyCharm
- 使用Docker运行TensorFlow
- docker coentos7 tensorflow
- Docker使用TensorFlow Serving
- docker 安装tensorflow
- TCP/IP详解学习笔记(12)-TCP的超时与重传
- 微软MSDN官方(简体)中文操作系统全下载
- laravel 路由失败
- 快速搭建wordpress和phpAdmin
- c++ 数据结构实训 希尔排序
- vmware + ubuntu + docker+ tensorflow
- TCP/IP详解学习笔记(13)-TCP坚持定时器,TCP保活定时器
- Servlet(一)
- 关于getGenericSuperclass方法和getActualTypeArguments()[0]方法的使用
- Navicat连接oracle数据库报错:ORA-12737 Instant Client Light:unsupported server character set ZHS16GBK
- 剑指offer——第一次只出现一次的字符
- redis 安装
- Linux给新建用户ssh权限问题
- 解决linux下WaitForMultipleObjects的一种方法