Skip to content

Cloudknot v0.1.1

Choose a tag to compare

@richford richford released this 17 Nov 22:48
· 489 commits to master since this release

Welcome to cloudknot, a python library that lets you run arbitrary python functions on AWS Batch.

It's as easy to use as:

import cloudknot as ck

def my_awesome_func(b):
    """Here is a function I want to run on AWS Batch"""
    # Always import dependencies within the function
    import numpy as np

    x = np.random.normal(0, b, 1024)
    A = np.random.normal(0, b, (1024, 1024))

    return np.dot(A, x)

# Create a `Knot`, the primary object in cloudknot (read the docs)
knot = ck.Knot(name='my_awesome_func', func=my_awesome_func)

# Submit 20 jobs (each one will run on AWS Batch and then send the results back here)
result_futures = knot.map(range(1, 20))

You can find out more at:
documentation: https://richford.github.io/cloudknot/
GitHub repo: https://github.com/richford/cloudknot

Give it a whirl. If you like it, star the repo on GitHub. And if you use it in your research, please let us know.
We hope it makes your research computing experience easier.