Skip to content

RedHat-EMEA-SSA-Team/fahclient-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fahclient-container

Dockerfile for containerized FAHClient rootless and K8S ready to help Folding@Home project research against COVID-19

https://foldingathome.org/2020/03/15/coronavirus-what-were-doing-and-how-you-can-help-in-simple-terms/

Base image

Using CentOS8 Base image on master branch for compatibility with their available RPM

Public Registry

We put our image on Quay.io public registry that you can use to pull the image. Quay has also build triggers and updates this image for each changes we push.

https://quay.io/repository/redhat-emea-ssa-team/fahclient-container

Build with Docker

$ docker build .

Build with Buildah

$ buildah bud -t fahclient-centos8 .

Run with Docker

$ docker pull quay.io/redhat-emea-ssa-team/fahclient-container:latest
$ docker run --rm --name fahclient-centos8 -e USER=<YOUR_FAH_USERNAME> -e PASSKEY=<YOUR_FAH_PASSKEY> -e TEAM=<YOUR_TEAM_ID> -e POWER=<light|medium|full> -e GPU=<false|true> -ti quay.io/redhat-emea-ssa-team/fahclient-container:latest

Get the IP to connect

$ docker inspect --format '{{ .NetworkSettings.IPAddress }}' fahclient-centos8

Browse to http://<IP>:7396

Run with Podman

$ podman pull quay.io/redhat-emea-ssa-team/fahclient-container:latest
$ podman run --rm --name fahclient-centos8 -P -e USER=<YOUR_FAH_USERNAME> -e PASSKEY=<YOUR_FAH_PASSKEY> -e TEAM=<YOUR_TEAM_ID> -e POWER=<light|medium|full> -e GPU=<false|true> -ti quay.io/redhat-emea-ssa-team/fahclient-container:latest

Get port to connect to WebUI

$ podman port -l
7396/tcp -> 0.0.0.0:33675

Browse to http://localhost:<PORT>

Run with Kubernetes

If you run it on Kubernetes you have to take in consideration Anti-Affinity policy of Pod replicas scheduling, in this computation model it is more effective the vertical scaling rather than horizontal one.

Run with OpenShift and OKD

$ oc new-app https://github.com/RedHat-EMEA-SSA-Team/fahclient-container.git --name fahclient-centos8 --env  TEAM=<YOUR_TEAM_ID> --env GPU=<false|true>

OCP Screenshot

Access the WebUI via OpenShift Route:

$ oc expose svc/fahclient-centos8

Browse to: http://fahclient-centos8-<PROJECT_NAME>.apps.<CLUSTER_DOMAIN>

OCP Route Screenshot

Run on K8S

Build the Container Image and push it to your registry, then deploy it.

Example:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: fahclient-centos8-deployment
  labels:
    app: fahclient-centos8
spec:
  replicas: 1
  selector:
    matchLabels:
      app: fahclient-centos8
  template:
    metadata:
      labels:
        app: fahclient-centos8
    spec:
      containers:
      - name: fahclient-centos8
        env:
        - name: TEAM
          value: '11812'
        - name: GPU
          value: 'false'
        image: quay.io/redhat-emea-ssa-team/fahclient-container:latest
        ports:
        - containerPort: 7396

Run it with kubectl (using default values for ENV):

$ kubectl create -f deployment.yaml

Join us!

If you want to join our Redhat team you can just our team id 11812 in your container environment, or just in your config.xml if you don't use it as container.

About

Dockerfile for containerized FAHClient rootless and K8S ready https://foldingathome.org/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published