-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Idea: Make Docker wrapper for BOINC tasks #5512
Comments
There are various little confusions here; |
Why shouldn't BOINC client know anything about docker? What is the alternative? |
BOINC client knows nothing about VitrualBox either, and all the communication is done via the wrapper. |
Aah ok I was confused on wording. I'll update the post to indicate the wrapper should know about these things, not BOINC client itself. |
Let's not confuse 'Docker Desktop' with Docker. An app version can contain lots of files (which are by default persistent). So I think this discussion is about efficiency (runtime, file sizes etc.) |
I did some testing on this on a Windows 10 machine starting from a fresh Windows install for Windows 10 Home and Windows 10 Pro. I haven't tested Windows 11 yet but I will hopefully have a machine to test it on later this week. I expect the results will be similar as I haven't read anything to indicate they'd be different. Also updated the main issue with some new info. Test procedure:
In both cases, after installation of Docker/WSL2, Virtualbox runs in slower "turtle"/emulation mode. In Windows 10 pro, the docker installation offers to use WSL2 or Hyper-V. I tried both methods, both of which resulted in turtle mode. |
Added some updates |
Background
Docker is a containerization format which has become quite popular in recent years, particularly in the development of AI models. It solves many of the same problems Virtualbox does but with some key advantages:
Even if Docker cannot be stably run on BOINC Windows clients, it may still be attractive to BOINC projects targeting Linux/MacOS clients due to simplifying packaging for complex apps.
The major downside with Docker is that if installed on Windows machines, it interferes with Virtualbox and forces Virtualbox to run in "emulation" mode which is significantly slower.
SCI has volunteered to pay a bounty out to a developer who can implement a docker plan class, once a proper spec is hashed out.
WSL vs Docker vs Virtualbox
WSL, Docker, and Virtualbox all offer similar functionalities with different tradeoffs in terms of performance and usability.
Virtualbox runs an entire virtual machine/operating system. This means you can package up an entire Linux OS into a single image file and run it on any platform Virtualbox supports.
WSL and Docker are both more lightweight than Virtualbox. Instead of running an entire OS, they run just the Linux kernel and any libraries you add. This achieves near native runtime speed and enables you run any Linux application in Windows. In Docker, you can share libraries and between different containers, potentially reducing disk space usage.
Here's how that looks as a diagram. From this site.
The only situation where Virtualbox can do something Docker can't is when:
Docker also supports checkpointing, running multiple instances off a base image, etc.
Integration options
There are several ways BOINC can utilize these tools to deploy WUs to end clients
Deploy WSL2 distributions natively
This will get you performance gains vs virtualbox, but WSL2 images are only useful on the Windows OS.
Deploy Docker containers natively
Deploy Docker containers inside Virtualbox images
Deploy Docker containers inside a WSL2 image
What BOINC needs to know
If we want the BOINC client to be "docker un-aware" and to be able to deploy docker images to clients which haven't updated to a recent version, a wrapper would need to be written which the BOINC client could call just like any other application. The same would be true if we just used WSL2 images or deployed docker inside WSL2. The wrapper could support existing BOINC hooks for starting, suspending, etc.
The primary downsides of having each BOINC WU contain a wrapper are:
The upside to doing things this way is not needing to modify the core BOINC client and being able to deploy docker containers to hosts with older BOINC versions. Though that second benefit is debatable since those clients likely don't have WSL2/docker installed.
Having BOINC be "docker aware" might be more complex, but gives BOINC a better high-level overview and control over the docker containers running on a client machine.
Existing work:
Known problems/open questions/tasks:
WSL, Docker, and Virtualbox Conflict
Docker runs in WSL2. While it did run in WSL1 at some point in time, I'm not sure if this is still possible, but WSL2 is the suggested WSL to use with Docker.
WSL can be tricky to run alongside Virtualbox, but it can be done. The downside is that if you have WSL2 installed, Virtualbox runs in emulation mode which is a significant performance degradation.
List of popular operating systems and their compatibility of VirtualBox/Docker.
Legend:
✅ - yes
✅✅ - yes, and we have actually tested this
Notes:
Available solutions to WSL2/Virtualbox conflict
Other tasks/open questions
Feature layout
The text was updated successfully, but these errors were encountered: