Coder Social home page Coder Social logo

dask-ecs's Introduction

Dask ECS

This is an opinionated template for spinning up a dask cluster based on docker.

CloudFormation Topology

Install

First clone this repo.

Then navigate to your aws console cloudformation dash -> create stack -> choose a template -> Upload a template to Amazon S3 -> choose file -> then navigate to this dask-ecs-template.yaml file. In the web portal you can configure to your liking.

Example Docker Containers

https://hub.docker.com/r/sayreblades/dask-ecs/

Example Dask Client

from dask import bag as db
import distributed


client = distributed.Client(address="[YourDaskServer:Port]")
b = db.from_sequence([1, 2, 3, 4, 5, 6])
c = b.map(lambda o: o*2)
f = client.compute(c)
f.result()

Logs

Creates logs in cloud watch. The log group name will be the name you gave the cloud formation stack.

To view logs use the cloudwatch web interface or awslogs: https://github.com/jorgebastida/awslogs

awslogs get [log group name] -w

Similar Projects

Warnings

  • The cluster is wide open in terms of network connectivity. Use at your own risk.

  • The current configuration uses a custom ami image (ami-2505a35f) which is only available in us-east-1 region.

  • If you are using the p2.x class of machines for your cluster, you may need to request a resource limit increase based on your region: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html

  • If you are attempting to use dask locally, you should take care that your local python dependencies exactly match the versions deployed to the cluster. One convention Im using to manage this is by maintaining a requirements.txt file associated with each docker container. See https://github.com/SayreBlades/dask-ecs/tree/master/dockerfiles/python35 Which was used to build the container: sayreblades/dask-ecs:python35

Notes

For building AMI's for use with ECS... putting these here for future reference:

https://stackoverflow.com/questions/39018180/aws-ecs-agent-wont-start http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-install.html http://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_container_instance.html

For building GPU (p2.xlarge) instance on ecs:

https://github.com/bfolkens/nvidia-docker-bootstrap

TODO

  • add optional security
  • add a cuda ready image for each region

dask-ecs's People

Contributors

sayreblades 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.