Windows安装TensorFlow-Docker Installation of TensorFlow on Windows

TensorFlow是Google开发的进行Deep Learning的包,目前只是支持在Linux和OSX上运行。不过这个秋季或许就有支持Windows的版本出现了,那么对于使用Windows的开发人员呢,想用TensorFlow也不必等到秋季或转到Linux和OSX系统。在Windows上运行有两种方式,一种是安装虚拟机并且安装Ubuntu系统,在Ubuntu系统上安装TensorFlow,具体步骤可以在Google官网上找到:https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html#pip-installation。另外一种方式是用Docker来安装。下面我就分享一下我用Docker安装TensorFlow的经验。以下采用Chinglish,并非搬运,但也简单易读。

One can always install TensorFlow on Ubuntu in a virtual machine if you are using Windows. Alternatively, you can also choose Docker-Installation.

1. Install Docker From:

https://www.docker.com/products/docker-toolbox

I recommend you install Git for Windows and Oracle VM VirtualBox independently, and thus you just need to click "next". Git for windowns can be accessed at https://git-for-windows.github.io/ amd Oracle VirtualBox can be downloaded at: https://www.virtualbox.org/.

 

2. Open Docker Quickstart Terminal

It will run pre-create checks and one may need to enable "Visualization" in BIOS if it is not. Then you will see the cute whale. 

Sometimes, you may need to regenerate certifications, otherwise you will find error information after the virtual machine. It happened to me, to regenerate the certifications you need to type:

$docker-machine regenerate-certs default

To generate a new virtual machine called "vdocker", you can type:

$docker-machine create vdocker -d virtualbox

Now you can check the running virtual machine by typing:

$docker-machine ls

Or in Virtual Box you will see:

If you see the running virtual machine, then you can go to the next step to install TensorFlow

3. Install TensorFlow

Open a cmd, rather than Docker Terminal,

type

>FOR /f "tokens=*" %i IN ('docker-machine env --shell cmd vdocker') DO %i

Then install TensorFlow:

>docker run -it -p 8888:8888 b.gcr.io/tensorflow/tensorflow

4. Open chrome and go to Open chrome and go to http://192.168.99.***:8888/

You need change the IP according to your case. Then you open the Jupyter and try your first deep learning example.

 

It will give you W is about 0.1 and b is about 0.3:

Enjoy TensorFlow and explore more on deep learning on your own!

By 董辉(ECE@德克萨斯大学Austin分校)

原创内容,未经许可,不需转载!

转载于:https://www.cnblogs.com/huidong/p/5426556.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值