Skip to content
Artem Naluzhnyy edited this page Apr 22, 2020 · 5 revisions

This is developers wiki. For end-user guides please visit https://alco-coders.github.io/stop-covid-19/


FIXME: split the original guide into developers wiki and end-user guides.

stop-covid-19

Running Folding@home and Rosetta@home on your AWS EC2 Spot instance to fight with COVID-19.

This repository contain templates that create an AWS spot instance in an autoscaling group for running either Folding@Home or Rosetta@Home client.

Folding@home is a computing platform to assist disease research, for instance to find a cure for the COVID-19 virus.

Rosetta@home is a distributed computing project for protein structure prediction on the Berkeley Open Infrastructure for Network Computing (BOINC) platform.

Click to expand!

The template uses G4-type instances with NVIDIA TESLA T4 GPUs.

The template installs the following software:

  • AWS Deep Learning AMI (Amazon Linux 2)
  • Folding@home client v7.5 latest

Folding@home client is started automatically after instance initialization is complete. Client runs until the template is removed, auto scaling group tries to keep running a singlr spot instance all the time. The template bids 100% of on-demand price and instances are unlikely to be reclaimed. Spot instance pricing varies: expect approximately 60-70% discount for G4 instance type.

Usage

Launch from AWS Console

Create stack using the template S3 URL: https://folding-at-home.s3.amazonaws.com/folding.yml

Parameter Description
FoldingTeam Folding@home team number (default 2164 for Ukraine)
FoldingUser Folding@home username
InstanceType EC2 instance type to launch (default is g4dn.xlarge

Cost of spot instances may vary by availability zone. Use subnets across different availability zones to give lower cost.

Region Create Stack
Asia Pacific (Mumbai) ap-south-1 Launch Stack
Asia Pacific (Singapore) ap-southeast-1 Launch Stack
Asia Pacific (Sydney) ap-southeast-2 Launch Stack
Asia Pacific (Tokyo) ap-northeast-1 Launch Stack
Asia Pacific (Seoul) ap-northeast-2 Launch Stack
Canada (Central) ca-central-1 Launch Stack
Europe (Frankfurt) eu-central-1 Launch Stack
Europe (Ireland) eu-west-1 Launch Stack
Europe (London) eu-west-2 Launch Stack
Europe (Paris) eu-west-3 Launch Stack
South America (SΓ£o Paulo) sa-east-1 Launch Stack
US East (N. Virginia) us-east-1 Launch Stack
US East (Ohio) us-east-2 Launch Stack
US West (N. California) us-west-1 Launch Stack
US West (Oregon) us-west-2 Launch Stack

Launch from CLI

Replace FoldingTeam, FoldingUser and InstanceType values:

aws cloudformation create-stack \
  --stack-name FoldingAtHome \
  --template-url https://folding-at-home.s3.amazonaws.com/folding.yml \
  --parameters \
    ParameterKey="FoldingTeam",ParameterValue="0" \
    ParameterKey="FoldingUser",ParameterValue="Anonymous" \
    ParameterKey="InstanceType",ParameterValue="g4dn.xlarge" \
--capabilities CAPABILITY_IAM

Access Web UI

# find the instance ID based on Tag Name
INSTANCE_ID=$(aws ec2 describe-instances \
               --filter "Name=tag:Name,Values=FoldingAtHome" \
               --query "Reservations[].Instances[?State.Name == 'running'].InstanceId[]" \
               --output text)
# create the port forwarding tunnel
aws ssm start-session --target $INSTANCE_ID \
                       --document-name AWS-StartPortForwardingSession \
                       --parameters '{"portNumber":["7396"],"localPortNumber":["7396"]}'

Starting session with SessionId: sst-00xxx63
Port 7396 opened for sessionId sst-00xxx63
Connection accepted for session sst-00xxx63.

Installation paths

Folding@home configuration is output to/etc/fahclient/config.xml . Folding progress log output is written to /var/lib/fahclient/log.txt. Show status of the service with systemctl status FAHClient .

Release History

  • 20.4.13
    • Initial version

Resources

Credits

Meta

This software is provided "as is", without warranty of any kind.

Distributed under the MIT license. See LICENSE for more information.