Editor’s Note: Today the Balena team announced the Fold for Covid project, a simple way for anyone to contribute spare compute power from home to support research of COVID-19 treatments. For more background on how and why we created the project, here’s our Developer Advocate, David Tischler.
Like many folks, I have been preoccupied with finding a way to help combat the global coronavirus pandemic. While I don’t have any experience with 3D Printing, building ventilators, or any of the other citizen projects that have been gaining momentum, I did notice that the [email protected] and [email protected] distributed computing projects had begun sending Covid-19 work units to users via their platforms.
How does it work?
Both [email protected] and [email protected] enable people to “donate” their local PC or laptop computing power to perform scientific calculations and simulation work when they are not using them for their own tasks. A small program is installed on a user’s machine, and then the project owner can send work to the user’s machine to be processed locally.
Once the task has completed, it is uploaded back to the doctors and scientists running the project for analysis. This lets scientists leverage a massive amount of spare compute capacity from all around the world to perform large computations for free.
Could we contribute single-board devices?
I thought, “Great, I have a ton of unused (small) computers sitting around, I can simply plug them in and scientists can use them to do work!” However, after some trial-and-error and a bit of research, I discovered that neither [email protected] nor the [email protected] project supported sending work units to Arm-powered devices such as the Raspberry Pi, Nvidia Jetson Nano, Odroid, Tinkerboard, or other popular single board computers.
So, I couldn’t actually do any data crunching to help out researchers…yet.
Working on adding Arm support for [email protected]
I reached out to smart folks in the community, such as Sahaj Sarup from Linaro.org / 96boards.org, Dmitry Moskalchuk from Neocortix, and others who were willing to tackle the problem. After a bit of brainstorming, we contacted the Ecosystem Team at Arm, and they were able to very quickly connect us with the Baker Lab at the University of Washington (UW), who runs the [email protected] project.
The Baker Lab, specifically David Kim and Brian Coventry, were gracious and rapid to engage with our team. They helped us access the Rosetta source code, and over the course of a week or so, we ported it to Arm. Once we had it patched and successfully compiling on our personal 64-bit Arm systems, we then submitted it back to the UW for review.
The Baker Lab tested it for about a week or so in their staging branch called Ralph (Rosetta ALPHa), and during that time, we ran both test workloads and actual COVID-19 spike protein simulations on our Arm64 devices, to help validate the scientific results generated. Once the Baker Lab reviewed the output of the simulations, and they were verified as accurate, the engineers pushed the code to production on Rosetta, allowing work units to flow to our Arm-powered devices.
Making the process even simpler with balena
For those of you unfamiliar with balena, one of our strengths is to extend great projects to run on IoT devices and make them absolutely simple to deploy and manage. Our team’s goal is to make it easy for anyone of any skill level to add a small, containerized version of [email protected] to a spare device, boot it up, and join the fight against COVID-19. We believe in removing all the friction out of IoT projects– especially ones that helps us find treatments for this global pandemic!
The Hardware Hacker team at Balena helped automate and containerize the installation process needed by the client software (known as BOINC) and metadata needed for attaching to the [email protected] project. As a result, anyone could follow our standard balenaCloud workflow and add devices to a balenaCloud application, push the container via
balena push, and their device would begin protein folding and sending data to the UW.
We took the results of that first project and pushed even harder to make it super simple for anyone to donate a device and get involved.
Announcing Fold for Covid
Now that you have the backstory, that brings us to the launch of the Fold for Covid project, where users can very simply download a ready-made image for their spare laptops, Raspberry Pis, or other single board computer, flash it to an SD Card, and upon powering it up will automatically attach to the Rosetta project and join the fight.
Like any new piece of software, there are challenges to overcome. Many of the work units provided by [email protected] are large scientific calculations that need a device with 2GB of RAM to run the simulation. There are some smaller job units available as well, but they are not always guaranteed.
As the protein work evolves and more researchers understand their total memory requirement, this may change. As far as single-board performance goes, the Raspberry Pi 4 (2gb and 4gb variants), Nvidia Jetson Nano, or Intel NUC as common devices work well. Other “Community Supported” devices such as the NanoPi T4 could potentially work as well, but have been untested thus far. The Baker Lab is aware of this situation and are currently exploring ways to reduce the memory footprint required, but for now, you if you have a 1gb RAM device and are not receiving any tasks you will simply need to wait for some smaller units to become available.
Once your image is flashed and you power up your board, it will take a few moments for the initialization tasks to run, Rosetta to recognize your device, and the first work units to be downloaded. You can follow along with it’s progress (or check in on it later) by using a browser on another computer, and typing http://foldforcovid.local in the address bar. A graphical interface will appear, and you will see the exact work units being crunched, as well as their percent complete, as well as some device metadata. You can close the browser window at any time, and the device will continue to happily crunch data.
Join the COVID-19 fight with us
Every device helps as researchers need to run many simulations to potentially discover ways to treat COVID-19. These are big jobs that are being run…so don’t be surprised if they take multiple hours, half a day, or even a full 24 hours to complete. Once they finish, they are automatically uploaded to Rosetta, and new jobs are downloaded to start the whole process over.
One of the neat features of deploying the application this way is that you automatically join the ‘Fold for Covid’ team on Rosetta, and all of our statistics are combined and the total computing power can be viewed on the [email protected] website.
There are further instructions included on the website, and if you have any questions just ask them on our Forums so that we can help get you up and running, and join the fight.
Finally, if you do deploy the project to your devices, let us know via Twitter, Facebook, LinkedIn, or email to [email protected], we’d love to know about it! Let’s spread the word and grow the team to help the researchers find a treatment for COVID-19.