I am working on Windows and I need to use libraries, which are availible only with Linux (TensorFlow,Caffe). I would like to run the software on Docker. I cannot understand the docker mechanism clearly, so I am completly lost, when its up to my problem. What should I do and how should it work?
相关问题
- batch_dot with variable batch size in Keras
- Docker task in Azure devops won't accept "$(pw
- Inheritance impossible in Windows Runtime Componen
- how to get running process information in java?
- Is TWebBrowser dependant on IE version?
Edit:
About Windows Docker hosting capabilities (container on a Windows host):
About Windows Docker container capabilities (Windows in a Container):
Original Answer:
Bad news first: Docker is not (not fully correct, see edit above) supported on Windows hosts natively (okay, that depends on how you define "natively". I mean, Docker always needs a Linux-like Docker host, see the good news below).
The good news is that Docker can be used on Windows by running Docker containers on a Docker host, which is running as a virtual Linux machine on Windows e.g. on VirtualBox, VMware or, nowadays officially preferred on Windows 10 Professional: on Hyper-V.
The best news for you is: since Docker containers are running on Linux-like hosts and are offering a Linux environment within a container, you can install any Linux software within the container the same way as you would do on a native Linux machine. Say, you start a Docker container with interactive terminal from an Ubuntu Docker image, by issuing the command
you can run any
apt-get
command in this container.Note, that the data you have changed in a container are not meant to be persistent. Once you have installed the SW in the container, you may want to preserve your work by building a new Docker image from the new container using docker commit commands. An advanced and automated way to create such images is to add your tested installation commands as RUN directives in a Dockerfile and to build the image from it without the need to manually run an interactive container and manually add the software.
Windows 10 Anniversary edition includes a Linux subsystem (Ubuntu-based), what is commonly called
Bash on Windows
. It's not just Bash, it's a translation layer that allows you to run user-mode applications on Windows itself, and the Ubuntu binaries on top. You can use it to run user-mode applications.Scott Hanselman shows how you can use TensorFlow this way using exactly the same command you would on a Linux machine in Playing With Tensor Flow On Windows. Copying from Scott's post:
will install TensorFlow and
will start executing the MNIST demo
The only annoyance is that it's Ubuntu 14.04.5 LTS, not the latest 16.04