无法在Docker Windows上安装TensorFlow

时间:2016-11-07 15:18:29

标签: windows tensorflow docker-toolbox

在Windows上的Docker Tools上安装Tensorflow时出现此错误

docker: An error occurred trying to connect: Post http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.23/containers/create: open //./pipe/docker_engine: The system cannot find the file specified..
See 'docker run --help'.

如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

我按照this github问题中的步骤进行了操作。

Maksym@MaksymPC MINGW64 ~
$ docker ps
An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.23/containers/json: open //./pipe/docker_engine: The system cannot find the file specified.

Maksym@MaksymPC MINGW64 ~
$ docker-machine env default
Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.100:2376": tls: DialWithDialer timed out
You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.
Be advised that this will trigger a Docker daemon restart which will stop running containers.

Maksym@MaksymPC MINGW64 ~
$ docker-machine regenerate-certs
Regenerate TLS machine certs?  Warning: this is irreversible. (y/n): y
Regenerating TLS certificates
Waiting for SSH to be available...
Detecting the provisioner...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...

Maksym@MaksymPC MINGW64 ~
$ docker ps
An error occurred trying to connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.23/containers/json: open //./pipe/docker_engine: The system cannot find the file specified.

Maksym@MaksymPC MINGW64 ~
$ docker-machine env default
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="C:\Users\Maksym\.docker\machine\machines\default"
export DOCKER_MACHINE_NAME="default"
# Run this command to configure your shell:
# eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env default)

Maksym@MaksymPC MINGW64 ~
$ eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env default)

Maksym@MaksymPC MINGW64 ~
$ docker ps
CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS                         PORTS                  NAMES

然后,你可以运行

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