Getting access to GPU on Docker on Windows 10 - docker

I notice that nvidia has support for GPU and Docker, but I believe this is only for linux at the moment. Has anyone got it working on windows 10?
In particular, I'm hoping to get access to it for machine learning applications.
https://github.com/NVIDIA/nvidia-docker

Since Docker uses Virtualbox to work on Windows, and Virtualbox will not expose CUDA to the guest without PCI passthrough, I think it will not be possible to do this as you are thinking.

For 2018-01, it looks like no one was able to make it work yet.
Moreover, they say (#29, #197) it would require DDA (PCI passthrough), so, theoretically it should be possible to make it work on Windows Server 2016, but not on Windows-10. But even for Windows Server 2016 - I've not found any success stories.

Seems that in Windows 10 Docker does not uses Virtualbox to work in Windows. So it may work.
https://msdn.microsoft.com/en-us/virtualization/windowscontainers/quick_start/quick_start_windows_10

Related

it is possible to install docker desktop on VMWARE ESXI?

it is possible to install docker desktop on virtual machine (vmware) windows 10 on a VMWARE ESXI ?
i am trying to install desktop docker on my vmware virtual machine with windows 10.
I installed the wsl2 support but at the end of the installation docker crashes with the following error:
Docker desktop 4.0.1
Installation failed
Component CommunityIstaller.ServiceAction failed to start services: The service did not respond to the start or control request in a timely fashion
I have done several tests but I cannot avoid this crash in any way.
The Operating System is a build that meets the minimum requirements to install Docker.
However, I noticed that Hyper-V is not enabled in the windows features. can this be a problem?
I think maybe it's a grafted virtualization problem because I install docker inside a VM. it's possible?
How can I solve? (or do you think that i will fix this problem with linux virtual machines?)
Does your host machine have all the advanced flags for 'efficient' nested virtualization? I wouldnt really recommend a third layer install of docker (as the final container is then virtual , on paravirtual (wsl2) on virtual (HyperV), on virtual (Esxi). I heavily assume the performance will be terrible.
And yes: You need Hyper-V, it's a requirement still. I assume, as you say its not available on the features, youre running a windows 10 home? Then sorry, you need at least Windows 10 Pro for Hyper-V support.
But as youre running a ESXI host, go the better performing way: Install any Linux distro of your choise, install docker there - if you wanna use it for Visual Studio etc. , you can still remotely debug etc. - and its performing better than on an a even deeper nested virtualized windows-wsl2. And btw: if its because of GUI, simply install the free Visual Studio Code, it offers Docker Tools which offer you many configiruation and monitoring options in a GUI , without enforcing you to do such a super deep nesting.
Yes, it's definitely possible. I'd probably check the hardware assisted virtualization (if available) is enabled. If so, you might want to make sure you've satisfied the rest of the requirements for the WSL2 backend deployment. If you're still having issues, try an older version and try upgrading from there.

Docker on Windows in Production

I've been asked to research Docker. The question that I cannot get a definitive response to is "can you run Docker on Windows in production?".
I keep seeing "Docker image containers can run natively on Linux and Windows. However, Windows images can run
only on Windows hosts and Linux images can run only on Linux hosts, meaning a host server or a VM."
I'm not interested in running containerized windows applications (.net). We have Spring Boot (java) applications & are creating a microservices architecture. These containerized apps. don't need an OS running in the same container.
We also need an orchestration engine like Kubernetes and its unclear if this is something that can run in production on windows either.
I've been fighting the good fight trying to get deployment environments switched to Linux but that's a loosing battle at this point.
Citing the docs:
Welcome to Docker for Windows!
Docker is a full development platform for creating containerized apps,
and Docker for Windows is the best way to get started with Docker on
Windows systems.
Take this literally. It's meant by the vendor as a dev tool to develop your Docker environment on Windows, not a production environment. To run it in production, they expect a Linux host.
It's not clear if the OP is asking "Can I run Docker on Windows in production" (like from a licensing perspective), or "should I run it" (like from an experience perspective.) I have an answer that should address both points.
It's indeed interesting to note first that as I write this, all the answers and comments so far are from 2018 or (like the question) 2017.
Here's at least one 2019 post on the topic from Docker (including listing clients running in production, so it addresses both points):
https://www.docker.com/blog/5-reasons-to-containerize-production-windows-apps-on-docker-enterprise/
And while the title refers to Docker Enterprise, the article does say "Hundreds of enterprises now run Windows container nodes in production", without that Enterprise caveat.
Even so, folks who may "not want to pay to run Docker Enterprise" should note that Windows 2016 and 2019 include a license of Docker Enterprise, free. (As for the recent upheaval of Docker where the Enterprise product was sold to Mirantis, there's no indication yet that will change the included Windows licensing of it.)
Still, I realize that the OP and other readers may seek still more (documented) evidence of production Docker deployment on Windows. I'll leave that for others to elaborate. Just didn't think this should stand here without anything more recent than July 2018.
Check out this blog, it quotes "Windows Server 2016 is the where Docker Windows containers should be deployed for production".
First of all, I suspect this question is rather stale after 3 years. I don't know if you are still struggling with the problem, I would love to hear your experience and the route you had taken.
This is probably a biased answer but I will try to answer with my experience. Like you, we have also lost the good fight to persuade our client to use a Linux server. We have 2 metals and a small bunch of virtual machines running Windows Server 2019 - Server version 1809 (Which is not the cutting edge, but the most recent stable version) It was indeed an improvement on top of WS2016. However it still had some problems. The major problem was with the docker swarm. The overlay networking with routing mesh was not working properly. So we had to fall back to containers with docker-compose and manual service discovery, which kinda beats the purpose of docker.
That being said, the problem with the Swarm network could be because of the fact that we are using virtual machines and Hyper-v switches. On top of that, we had no direct access to host network and we had to jump through some bureaucratic hoops whenever we require changes in the network, which got super old super fast when we want to test stuff. Additionally, we did not have Active Directory because of our lack of confidence to network. I am still not sure if DCs would play with docker in a virtual environment. Still not having AD was manageable since we did not have many machines.
Another problem was that we did not have nested virtualization (i.e. cannot run moby) due to CPU issues, and WSL2 with support for Docker is not available on WS19 LTSC editions. So I had to write our own images for many stuff that we use. Like Jenkins, Redis, etc. You can find the dockerfiles here if interested But obviously keeping them up to date and tidy was a huge work and I did not have much time to invest.
Performance-wise, we seemed to have no issues but we did not really make a comparative analysis.
All in all, I love Docker, it is a great product. But after this project I am thinking not to touch Docker on windows in a production environment with a 10 foot pole. In fact, I don't know if I will ever use a Windows machine as production environment in the future. It is cool to have it in development though.
My understanding is that Containers on Windows Server should be fine for production while Containers on Windows Desktop should be only for dev and test, not production. I saw one post "MICROSOFT SOFTWARE SUPPLEMENTAL LICENSE FOR WINDOWS CONTAINER BASE IMAGE" https://learn.microsoft.com/en-us/virtualization/windowscontainers/images-eula, not sure how this one is related to this question?
I can highly recommend not to use Docker Desktop for Windows in Production.
The host machines (Windows 10 Pro) where configured to restart everyday at a certain time and the Docker Container where Linux containers which as recommended where using the WSL2 based engine.
I was testing it on 20 devices for a over one year now and from 20 Pc's had at least 5 now the problem that Docker Desktop cannot be initialized. Which means that Docker Desktop is not starting anymore until you remove some folder(s) in %APPDATA% but when you do so it worked only 3 out of 5 times for me that Docker Desktop was able to start after that. One time needed to reinstall Docker Desktop the remaining One I needed to reload all the docker images and configure them again. Most of the issues seemed to have been a result of a power cut.
Most annoying are the updates from my perspective, because from one to the other version all images and running containers where gone and I needed to reconfigure them, happend with 2 Version in the past but not on all computer.
The Linux machines on the other hand no issues.

How do you run an .exe file on Docker?

I am currently trying to understand and learn Docker. I have an app, .exe file, and I would like to run it on either Linux or OSX by creating a Docker. I've searched online but I can't find anything allowing one to do that, and I don't know Docker well enough to try and improvise something. Is this possible? Would I have to use Boot2Docker? Could you please point me in the right direction? Thank you in advance any help is appreciated.
Docker allows you to isolate applications running on a host, it does not provide a different OS to run those applications on (with the exception of a the client products that include a Linux VM since Docker was originally a Linux only tool). If the application runs on Linux, it can typically run inside a container. If the application cannot run on Linux, then it will not run inside a Linux container.
An exe is a windows binary format. This binary format incompatible with Linux (unless you run it inside of an emulator or VM). I'm not aware of any easy way to accomplish your goal. If you want to run this binary, then skip Docker on Linux and install a Windows VM on your host.
As other answers have said, Docker doesn't emulate the entire Windows OS that you would need in order to run an executable 'exe' file. However, there's another tool that may do something similar to what you want: "Wine" app from WineHQ. An abbreviated summary from their site:
Wine is a compatibility layer capable of running Windows applications
on several operating systems, such as Linux and macOS.
Instead of simulating internal Windows logic like a virtual
machine or emulator, Wine translates Windows API calls
on-the-fly, eliminating the performance and memory penalties of
other methods and allowing you to cleanly integrate Windows
applications into your desktop.
(I don't work with nor for WineHQ, nor have I actually used it yet. I've only heard of it, and it seems like it might be a solution for running a Windows program inside of a light-weight container.)

Access Windows 2016 Server Container (Docker container) via GUI?

I need to use Docker / Windows containers on Windows 2016 Server and prepare it Windows applications to run on it.
Configuring Windows via Powershell just is not as convenient though as it is on Ubuntu, especially if you never worked with Windows Server really and need to learn all the Powershell commands ;)
Is there a way to access a Windows Container via GUI?
It's possible with Docker, Ubuntu, VNC:
Can you run GUI apps in a docker container?
Wondering if anything similar can be done for Windows Containers?
(I am working on-premise, not using Azure. Found a similar but unanswered question here: https://stackoverflow.com/questions/32721422/windows-server-containers-azure-how-to-create-a-container-with-gui)
Thanks.
== Update ==
RDP is definitely not an option as per February 2016 - not sure if they plan to support it in the final release?!
https://msdn.microsoft.com/en-us/virtualization/windowscontainers/about/work_in_progress#remote-desktop
Remote Desktop
Windows Containers cannot be managed/interacted with through a RDP session in TP4.
So far I managed to have at least a decent file explorer by using Midnight Commander, but still command line on Windows is not much fun.
in this video MS-container-developer Taylor Brown says that they break up with RDP from TP3 to TP4 and will very probably do not support RDP in RTM Version Server 2016:
https://channel9.msdn.com/Events/TechNetVirtualConference/TechNetVC2016/Day-3-Containers-Session-with-QA
Update as of Dez. 2018:
Server 2019 is out and RDP is still not possible / supported for all container images. (of course it does not make any sense for nano images)
check this nice intro to what has changed: https://stefanscherer.github.io/docker-on-windows-server-2019/
to have a somewhat complete overview, it should be mentioned that there are some hacks out in the wild, that may RDP make work in some images and setups, e.g.:
https://withinrafael.com/2018/03/09/using-remote-desktop-services-in-containers/

Creating docker container with HP UX and IBM AIX

Can i create a docker container with HP UX and IBM AIX, if so please let me know how to do it?
I tried by creating container from HP UX tar, it got created and i got conatiner id but unable to login in to the container.
Let me know where i am doing wrong.
If you look in the FAQ https://docs.docker.com/faq/ you will see as supported
Ubuntu 12.04, 13.04 et al
Fedora 19/20+
RHEL 6.5+
Centos 6+
Gentoo
ArchLinux
openSUSE 12.3+
CRUX 3.0+
This github issue is closed at the moment https://github.com/docker/docker/issues/3546 but that could change. What you try to do is not supposed to work at the moment (which says nothing about the technical possibility)
The IBM developerWorks site has a guide on how to do this, I'm currently doing similar work on Z at the moment.
Docker on POWER at developerWorks
No. It is impossible to build AIX and HP-UX docker containers because the AIX and HP-UX are totally different operation systems with differently build closed SystemV kernels running only on RISC based CPU's compared to the wide spread Linux distributions running on almost everything.
If you have applications that only runs on AIX or HP-UX but you want them in a container, AIX has the option of using Workload Partitions, which is almost comparable with containerization.

Resources