Donating computing power to Science: How to run containerized BOINC with OpenCL and VirtualBox

cover

Don’t you want to do something more useful with your silicon and electricity than producing low entropy outputs of hash functions (in other words: mining coins)?

There is something more useful in my opinion. From Wikipedia:

The Berkeley Open Infrastructure for Network Computing (BOINC, pronounced /bɔɪŋk/ – rhymes with “oink”) is an open-source middleware system for volunteer computing and grid computing.

From the official BOINC website:

BOINC lets you help cutting-edge science research using your computer. The BOINC app, running on your computer, downloads scientific computing jobs and runs them invisibly in the background. It’s easy and safe.

The security conscientious will raise an eyebrow when they read that some closed source binary blobs are automatically downloaded from somewhere in the internet and then executed on your machine. But not to worry! One of the purposes of containers was to isolate programs. Again from Wikipedia:

OS-level virtualization is an operating system paradigm in which the kernel allows the existence of multiple isolated user space instances. Such instances, called containers […] may look like real computers from the point of view of programs running in them. A computer program running on an ordinary operating system can see all resources (connected devices, files and folders, network shares, CPU power, quantifiable hardware capabilities) of that computer. However, programs running inside of a container can only see the container’s contents and devices assigned to the container.

So I set out to develop a container image which allows running BOINC with full hardware power (AMD and Nvidia GPGPU computation, virtualization via VirtualBox), but in complete isolation of the host system.

The result is at https://github.com/michaelfranzl/image_boinc-client

Happy number crunching!

If you think you found a mistake in this blog post, or would like to suggest an improvement to this blog post, you can write me an e-mail to the address public dot michael at franzl dot name; as subject please use the prefix "Comment to blog post" and append the post title.
 
Copyright © 2023 Michael Franzl