Giter Site home page Giter Site logo

cfn-foldingathome's Introduction

cfn-foldingathome

CloudFormation template for Folding@home on AWS spot instances.

Lint CloudFormation Templates

This template creates an AWS spot instance fleet for running the Folding@Home client. Folding@home is a computing platform to assist disease research, for instance to find a cure for the COVID-19 virus. The template uses G4-type instances with NVIDIA TESLA GPUs. Please only deploy it on accounts where you have the permissions to do so.

The template installs the following software:

  • Ubuntu 18.04 LTS
  • NVidia CUDA 10.2
  • Folding@home client 7.6.13

Folding@home client is started automatically after instance initialization is complete. Client runs until the template is removed, auto scaling group is scaled in or spot instance is reclaimed. 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.

WIP Please check whether the solution works for you.

Usage

Launch from AWS Console

Create stack using the template S3 URL: https://cfn-foldingathome.s3.amazonaws.com/foldingathome.yml

Parameter Description
Anonymous Folding@home fold anonymously (default true for anonymous)
FoldingAtHomePasskey Folding@home pass key (leave empty for anonymous user)
FoldingAtHomeTeam Folding@home team number (default 0 for no team)
FoldingAtHomeUser Folding@home user name (default Anonymous for anonymous)
InstanceCount Scale-out count of g4dn.xlarge instances to run the Folding@home client
KeyName SSH key name for ubuntu user
SSHLocation Network allowed to SSH to instances in public subnet (default 0.0.0.0/0 to allow from everywhere)
Subnets Subnets in VPC (for example the default VPC subnets 172.31.0.0/20, 172.31.16.0/20 and 172.31.32.0/20)
VpcId VPC for the stack (for example the default VPC 172.31.0.0/16)

Cost of spot instances may vary by availability zone. Auto scaling group may launch instances in higher cost AZs.

Region Create 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
Africa (Cape Town) af-south-1 Launch Stack
Asia Pacific (Hong Kong) ap-east-1 Launch Stack
Asia Pacific (Mumbai) ap-south-1 Launch Stack
Asia Pacific (Seoul) ap-northeast-2 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
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
Europe (Stockholm) eu-north-1 Launch Stack
Middle East (Bahrain) me-south-1 Launch Stack
South America (São Paulo) sa-east-1 Launch Stack

Launch from CLI

To launch one instance with anonymous folding, replace the KeyName, Subnets and VpcId values with your SSH key name and default VPC network parameters:

aws cloudformation create-stack \
  --stack-name FoldingAtHome \
  --template-url https://cfn-foldingathome.s3.amazonaws.com/foldingathome.yml \
  --parameters \
    ParameterKey="KeyName",ParameterValue="mykeyname" \
    ParameterKey="Subnets",ParameterValue="subnet-12345678\,subnet-56781234" \
    ParameterKey="VpcId",ParameterValue="vpc-abcdefgh" \
--capabilities CAPABILITY_IAM

Access Web UI

Forward port 7396 from the instance to localhost (replace public-ip with public IP address of the instance):

ssh ubuntu@public-ip -L 7396:localhost:7396

Now access the Web UI from: http://localhost:7396/

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.6.18
    • Updated base Ubuntu AMI image
  • 20.5.13
  • 20.4.26
    • Added SSHLocation parameter to limit SSH access (thanks FireballDWF!)
  • 20.4.25
    • Updated base Ubuntu AMI image
    • Added launch link for Africa (Cape Town) region
  • 20.4.23+1
    • Prepopulate GPUs.txt to remove the need for restart
  • 20.4.23
    • Added Folding@home user name and team as optional parameters
  • 20.4.19
    • Updated client to 7.6.9
  • 20.3.21
    • Add custom health check to auto-scaling group, marking instance unhealthy on Folding@home client failure
    • Changed from init script included with the package to systemd service
    • Signal failure of instance initialization script using cfn-signal
    • Log user instance initialization script output
  • 20.3.19
    • Use instance store for /var/lib/fahclient
    • Improved parameter descriptions
  • 20.3.17
    • Updated client to 7.5.1
    • Optimized GPU settings
    • Reviewed security group ingress
  • 20.3.16
    • Initial version

Resources

Meta

Janne Kataja – @jkataja – fistname.lastname at gmail

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

Distributed under the Apache License v2 license. See LICENSE for more information.

GitHub jkataja/cfn-foldingathome

cfn-foldingathome's People

Contributors

asrfs avatar fireballdwf avatar jkataja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cfn-foldingathome's Issues

FAHclient did not start

The FAHClient did not start and I had to restart the service before I could connect to the web interface. It also seems like its not configured to use the GPU. I assume I need to set

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.