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!

时间: 2024-11-09 10:11:36

Windows安装TensorFlow-Docker Installation of TensorFlow on Windows的相关文章

Docker Desktop for Windows 安装步骤

Doker Desktop for Windows 安装要求 Docker Desktop for Windows需要运行Microsoft Hyper-V.如果需要,Docker Desktop for Windows安装程序会为您启用Hyper-V,并重新启动计算机.启用Hyper-V后,VirtualBox(这是不支持Hyper-V的Windows上安装Docker Toolbox时候需要运行的虚拟机软件,这里我们默认你的Windows是支持Hyper-V的)不再起作用,但仍保留任何Vir

Windows安装mapnik

windows安装mapnik,首先去官网下载windows压缩包:http://mapnik.org/,解压位置C:\mapnik-v2.2.0 然后下载安装python2.7,安装位置  C:\Python27 设置环境变量path: C:\Python27;  C:\mapnik-v2.2.0\lib;  C:\mapnik-v2.2.0\bin; 新建系统变量  PYTHONPATH  值为 : C:\mapnik-v2.2.0\python\2.7\site-packages 在命令提

RabbitMQ windows安装官方文档翻译!

RabbitMQ Windows安装和配置 下载地址 官网windows下载地址: http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.10/rabbitmq-server-3.6.10.exe github windows版下载地址: https://github.com/rabbitmq/rabbitmq-server/releases/download/rabbitmqv36_10/rabbitmq-server-3.6.10.exe

Windows安装使用Openssl创建pks p12证书

什么是OpenSSL? OpenSSL是用于安全通信的著名开源密码学工具包,包括主要的密码算法.常见密码和证书封装功能. 1. OpenSSL官网 官方下载地址: https://www.openssl.org/source/ 2. Windows安装方法 OpenSSL官网没有提供windows版本的安装包,可以选择其他开源平台提供的工具.例如 http://slproweb.com/products/Win32OpenSSL.html以该工具为例,安装步骤和使用方法如下: 2.1 选择32位

01 Windows安装Tensorflow

1.安装Python. 点击此处下载Python3.5.2.安装Python时一定要选择安装pip. 2.配置Python环境变量. 将%安装路径%\Scripts添加到Path下面. 3.修改Pip国内源. 在C:\Users\l{你的用户名}\AppData\Local下面创建pip文件夹,在pip文件夹中新建pip.conf文件,写入以下内容. [global] index-url = http://mirrors.aliyun.com/pypi/simple/ [install] tru

tensorflow在windows安装及小试

由于工作需要,这里尝试在windows下再安装一套tensorflow.正好本机之前已经安装过Anaconda,可以直接通过Anaconda Navigator进行. 启动Anaconda Navigator,进入环境设置页面(Environments) 2.点击root环境下方的create按键,新建一个名称为tensorflow的环境(由于window版本的tensorflow不支持2.7版本的python,所以这里选择3.5版本) 3.创建成功后,在tensorflow环境下搜索tenso

windows 安装TensorFlow

我的windows版本是8.1,装了python3.6之后,用pip安装TensorFlow,总是失败: 网上有各种说法,其中一种是更新pip,试了没用.还有一种是查看python版本:如下图,命令行进入python,可以看到是32位的, pip install tensorflow 需要64位的,这种说法是卸载重装64位的python.这个没有尝试. 我用的是anaconda. 安装anaconda 安装TensorFlow 下载好anaconda之后,一路安装就可以了,过程可能有点慢.安装完

Docker for Windows安装与Linux+PHP开发环境搭建(一)

Docker是什么? 简单得来说,Docker是一个由GO语言写的程序运行的"容器"(Linux containers, LXCs); 目前云服务的基石是操作系统级别的隔离,在同一台物理服务器上虚拟出多个主机.Docker则实现了一种应用程序级别的隔离; 它改变我们基本的开发.操作单元,由直接操作虚拟主机(VM),转换到操作程序运行的"容器"上来. Docker的好处 Docker的优点:运行快.部署敏捷.灵活.轻量.开源免费. Boot2Docker是一个专为Do

Ubuntu16.04下安装tensorflow(Anaconda3+pycharm+tensorflow+CPU)

1.下载并安装Anaconda 1.1 下载 从Anaconda官网(https://www.continuum.io/downloads)上下载Linux版本 https://repo.continuum.io/archive/(推荐python3.5) 1.2 安装 cd ~/Downloads sudo bash Anaconda2-5.0.1-Linux-x86_64.sh (这里下载了Python2.7的对应版本) 询问是否把anaconda的bin添加到用户的环境变量中,选择yes!