Giter Club home page Giter Club logo

informatics-lab.aws_gpu_setup's Introduction

AWS GPU instance setup

This terraform script creates a p2.xlarge instance in AWS and allows you to connect to a Jupyter notebook running on the server. I've tried to make it generic but I've only tested on our own AWS setup so may need some tweaking. Improvements welcome :)

You can choose either the fast.ai AMI or the AWS Ubuntu deep learning AMI

You may need to contact Amazon to get authorisation to run p2 instances, see the fast.ai setup instructions for more details.

Dependencies

  • terraform
  • autossh

These can be installed with brew on Mac

Setup

  • terraform init <./fast_ai and/or ./aws_deeplearning>

Instructions

With bastion host

  1. Define variables in terraform.tfvars
  • bastion_host: host / ip of bastion host to jump through
  • allowed_cidr: cidr block of your vpc, e.g. 10.0.0.0/16
  1. Optionally run terraform plan <./fast_ai or ./aws_deeplearning> to check the infrastructure that will be created. Run terraform apply <./fast_ai or ./aws_deeplearning>

  2. Run ./connect_notebook.sh

  • The Notebook process can take quite a while to start, you may need to wait a minute
  • Default password is dl_course

Without bastion host

  1. Define variables in terraform.tfvars
  • allowed_cidr: your public ip address, e.g. "xxx.xxx.x.xx/32"
  1. Optionally run terraform plan <./fast_ai or ./aws_deeplearning> to check the infrastructure that will be created. Run terraform apply <./fast_ai or ./aws_deeplearning>

  2. Directly connect to <instance_public_ip>:8888

  • The Notebook process can take quite a while to start, you may need to wait a minute
  • Default password is dl_course

Destroy

The p2.xlarge currently costs ~$1 per hour.

  1. terraform destroy <./fast_ai or ./aws_deeplearning>
  • Answer yes / use --force flag

informatics-lab.aws_gpu_setup's People

Contributors

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