Giter Site home page Giter Site logo

cdkfoldingathome's Introduction

fah

CDK-Folding@Home

Run Folding@Home with this prebuild CDK library and never forget to shut off expensive instances. With built-in TTL for your stack, you just define the lifetime of your instances and the stack will be destroyed afterwards.

About Folding@Home

Folding@home is a project focused on disease research. The problems F@H is solving require many computer calcul­ations – so you can donate your excess compute power to help their research. In that sense, you are part of a huge distributed supercomputer!

The architecture follows this AWS blog post and leverages g4dn.xlarge Spot EC2 instances to maximise GPU vs price efficiency.

Running at spot price drastically reduces the price from 0.59$ per hour to around 0.17 in eu-west-1. That's a nice 70% in savings.

spotsavings

I hope you enjoy this package and together we can make a difference and help the Folding@Home program to succeed in their mission!

Progress

After deployment, you can go into CloudWatch logs and open the log group fahlog. You can now see the progress every one of your instances makes towards the goal of unfolding proteins. wu01fahlog.png wu01 represents the work of the GPU and wu00 is the work of the CPU .

Big thanks to cdk-time-bomb for the TTL function and Ash Belmokadem and Vikin Shetty for debugging help!

How to use it

  1. Create a new CDK app

  2. Install CDK-Folding@Home in your CDK app

npm install cdkfoldingathome
  1. Open your stack.ts file in ./bin

  2. Import cdkfoldingathome

import * as folding from 'cdkfoldingathome';
  1. Create folding stack - important to specify accountId and region
const fah = new folding.FoldingathomeStack(app, 'folding', {
    timeToLive: cdk.Duration.hours(5),
    spotPrice: '0.40',
    numberOfInstances: 10,
    env: {
        account: "754950554578",
        region: "eu-west-1"
    }
})
  1. Ready to build and deploy!

  2. Your stack gets destroyed once the TTL is up

  3. Double-check the first time to be sure your stack got really deleted 😉

If you have any questions reach out on Github or Twitter.

cdkfoldingathome's People

Watchers

 avatar

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.