• Stars
    star
    104
  • Rank 330,604 (Top 7 %)
  • Language
    Dockerfile
  • License
    BSD 3-Clause "New...
  • Created over 4 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

β›‘ Run folding@home on your Kubernetes cluster

k8s-fah

Run folding@home on Kubernetes.

The folding@home project added support for the Corona virus (2019-nCoV).

This deployment lets you run folding@home on Kubernetes, should you have any spare cluster-power you'd like to donate.

Note: COVID-19 work units are currently being prioritized, however the folding@home client is liable to select jobs for other diseases too.

If/when they add an option to work only on COVID-19, I will update the deployment here to do so (until the pandemic is over).

Β 

Overview

There are options to run this on CPU, GPU or a combination of both.

To use these deployment sets that uses GPU's to fold with, I assume that you have a working k8s cluster that have nodes with either 1 or more NVIDIA GPUs in them. (AMD have not been tested).

We are using the same prerequisites as the k8s-device-plugin

  • NVIDIA drivers ~= 384.81
  • nvidia-docker version > 2.0 (see how to install and it's prerequisites)
  • docker configured with nvidia as the default runtime.
  • Kubernetes version >= 1.10

Β 

Installation modes

Only CPU

The default install deploys 2 replicas, limited to using 1 CPU core each.

kubectl apply -f https://raw.githubusercontent.com/richstokes/k8s-fah/master/folding-cpu.yaml

Only GPU (Nvidia)

The default install deploys 2 replicas, limited to using 1 GPU in each pod.

kubectl apply -f https://raw.githubusercontent.com/richstokes/k8s-fah/master/folding-gpu.yaml

Both CPU & GPU (Nvidia)

kubectl apply -f https://raw.githubusercontent.com/richstokes/k8s-fah/master/folding-gpu-cpu.yaml

Minikube (CPU only mode)

Runs 6x replicas, 1 CPU core each.

kubectl apply -f https://raw.githubusercontent.com/richstokes/k8s-fah/master/folding-minikube.yaml

I like to give my minikube cluster extra resources with:

minikube config set cpus 6
minikube config set memory 8192
minikube delete && minikube start

Β 

Tested GPU's:

  • NVIDIA
    • NVIDIA GeForce GTX 1080
    • GeForce RTX 2080
    • Tesla K40m
    • Tesla K80
    • V100
  • AMD
    • ... If you have tested this on AMD GPU's, please make a PR accordingly and update the list!

Β 

Rancher

If you have Rancher, you can easily install by searching for "folding" in your Rancher app catalog.

Β 

DaemonSet

You can also run this as a DaemonSet (runs one replica per node) with:

kubectl apply -f https://raw.githubusercontent.com/richstokes/k8s-fah/master/folding-daemonset.yaml

There is a tolerations section in this .yaml you can uncomment in order to also run FAHClient on master nodes if you wish.

To enable GPU with the daemon set, uncomment the nvidia.com/gpu: "1" lines from folding-daemonset.yaml before applying.

Β 

Customizing

Set the replica count and resource limit as appropriate depending on how much CPU you wish to donate. In my testing, memory load has been reasonably low (<512Mi).

I've also added the framework for a PriorityClass, so that K8s may preemptively evict folding@home pods if a higher-priority pod needs resources.

Β 

config.xml

The most compatible way to edit the config.xml is by modifying it's values and creating your own Docker image.

You can override/mount as a configMap in Kubernetes (you can see the scaffolding for this inside the manifests), however FAHClient seems to what to copy/move this file around, which doesn't work if the file is mounted.

You'll get a bunch of errors from the FAHClient if you do this - there may be a better way to manage the config file - PRs welcome!

Β 

Credits

Special thanks to Bendik for his work on supporting GPUs and general tweaks to the configs.

More Repositories

1

cheekymonkey

🐡 Literally a Chaos Monkey for your Kubernetes clusters
Python
153
star
2

Forza-data-tools

🏎 Tools for playing with Forza Motorsport/Horizon's "data out" feature
Go
82
star
3

GPT2-api

πŸ€– (Easily) run your own GPT-2 API. Post writing prompts, get AI-generated responses
Python
27
star
4

k8s-scripts

My collection of useful scripts for Kubernetes
Shell
21
star
5

AWS-budget-to-slack

AWS Lambda function for posting billing updates to your Slack channel
Python
13
star
6

ut99_macos_installer

Installs Unreal Tournament '99 on MacOS. Works with Apple Silicon
Shell
12
star
7

EvilPortal-M5Stack

😈 Evil Portal implementation for the M5Stack Core S3
C
10
star
8

lets-encrypt-confluence

Generate and install a free lets-encrypt SSL Certificate on Confluence
8
star
9

wavehider

πŸ•΅πŸΌβ€β™€οΈ Hide secret documents inside audio files
Go
7
star
10

Forza-TCS

Hardware-based traction control system for the Forza Motorsport & Forza Horizon games
C++
4
star
11

SlackTail

Stream a log file (or any other standard input) to a Slack channel in real time
Python
3
star
12

hugo-aws-lambda

Deploy a hugo site automatically with this AWS Lambda function
Python
3
star
13

Apple-Notes-to-Dropbox-Paper

πŸ““ Copy your Apple Notes to Dropbox Paper
Python
2
star
14

mbot-Ranger

My line follower for the mbot-Ranger platform
C++
1
star
15

cosmic_shuffle

Randomize your Spotify playlists
HTML
1
star
16

bluehose

Terminal interface for the Bluesky firehose πŸ‘©πŸ½β€πŸš’
TypeScript
1
star
17

dupehunter

Python script to find (and optionally, delete) duplicate files
Python
1
star
18

spotify-randomizer

For when you want to randomize your saved songs into a new playlist
Python
1
star
19

Genesis-Glitcher

πŸ¦” Toy that generates interesting, random glitch art by automatically corrupting Sega Genesis/Megadrive games.
HTML
1
star