本文介绍了Docker下载Google的TensorFlow问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近Google推出了TiscFlow(机器学习库),它不是为Windows搜索而分发的,并且发现可以通过Docker下载它,
我在windows 8.1机器上安装了docker,然后按照

解决方案

如果你使用docker-machine,你不应该必须直接修改docker守护程序配置文件。



创建VM时使用 - engine-env 码头服务器的实例。

请参阅。



简单地定义%HOME%/。bashrc (当您打开您的虚拟机之前打开您的bash会话时,将读取它)

 别名dm = docker-machine 
导出http_proxy = $ HTTP_PROXY
导出https_proxy = $ HTTPS_PROXY
export NO_PROXY = $ NO_PROXY
export no_proxy = $ NO_PROXY

alias dmcv ='docker-machine create -d virtualbox --engine-env HTTP_PROXY = $ http_proxy --engine-env HTTPS_PROXY = $ https_proxy --engine-env http_proxy = $ http_proxy --engine-env https_proxy = $ https_proxy --engine-env NO_PROXY = $ no_proxy --engine-env no_proxy = $ no_proxy'

alias d = docker
alias dpsa ='docker ps -a'
denv(){eval $(docker-machine env$ @); }
vbmctr(){eval $(VBoxManage controlvm $ 1 natpf1$ 1- $ 2-tcp,tcp ,, $ 2 ,, $ 2); eval $(VBoxManage controlvm $ 1 natpf1$ 1- $ 2-udp,udp ,, $ 2 ,, $ 2);确保你的htt _sql_proxy被定义为:


$ / code $

  http:// username:[email protected]:port 

(注意它始终以 http:// 开始,即使是 https_proxy



还要确定定义 no_proxy

  NO_PROXY = .company,.sock,localhost,127.0.0.1,:: 1,192.168.99.100,192.168.99.101,192.168.99.102,192.168.99.103,192.168.99.104 

(由您的公司分机替换 .company



从那里,您可以执行以下操作:

  dmcv default 
denv默认
dm ssh默认

这里的关键是 dmcv 别名:它将创建一个使用代理修改的 / var / lib / boot2docker / profile 已经的虚拟机。



请注意,我总是使用这些代理va的upercase和小写版本可以通过不同的Unix命令(如curl,wget,...)来解释,这些命令依赖于小写字母,其他时候是upercase变量名。


Recently Google introduces the TensorFlow (machine learning library) which is not distributed for Windows I searched and find that it is possible to download it via Docker,I installed the docker on windows 8.1 machine and followed this and thisto get things work but since I am using a local proxy then I tried to export HTTP_PROXY, HTTPS_PROXY to /var/lib/boot2docker/profile file andnow when I run below command

I get

Can someone tell me how to fix this ?

my docker-machine's profile

解决方案

If you are using docker-machine, you shouldn't have to tinker directly with the docker daemon profile.

Use the --engine-env option when creating your VM instance for docker.
See docker-machine create.

Simply define %HOME%/.bashrc (which will be read when you open your bash session, before doing an ssh to your VM)

alias dm=docker-machine
export http_proxy=$HTTP_PROXY
export https_proxy=$HTTPS_PROXY
export NO_PROXY=$NO_PROXY
export no_proxy=$NO_PROXY

alias dmcv='docker-machine create -d virtualbox --engine-env HTTP_PROXY=$http_proxy --engine-env HTTPS_PROXY=$https_proxy --engine-env http_proxy=$http_proxy --engine-env https_proxy=$https_proxy --engine-env NO_PROXY=$no_proxy --engine-env no_proxy=$no_proxy'

alias d=docker
alias dpsa='docker ps -a'
denv() { eval $(docker-machine env "$@"); }
vbmctr() { eval $(VBoxManage controlvm $1 natpf1 "$1-$2-tcp,tcp,,$2,,$2"); eval $(VBoxManage controlvm $1 natpf1 "$1-$2-udp,udp,,$2,,$2"); }

Make sure your htt(s)_proxy are defined with:

http://username:[email protected]:port

(note that it always starts with http:// even for https_proxy)

Also make sure to define no_proxy:

NO_PROXY=.company,.sock,localhost,127.0.0.1,::1,192.168.99.100,192.168.99.101,192.168.99.102,192.168.99.103,192.168.99.104

(replace .company by your company extension)

From there, you can do a:

dmcv default
denv default
dm ssh default

The key here is the dmcv alias: it will create the VM with a /var/lib/boot2docker/profile already modified for you with proxy.

Note that I always use the upercase and lowercase versions of those proxy variables, in order to be interpreted by different unix commands (like curl, wget, ...) which rely sometime on lowercase, other times on upercase variable names.

这篇关于Docker下载Google的TensorFlow问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-27 19:58