churchlab / ml-ami-builder

Packer scripts to build nvidia-enabled AMIs
19 stars 4 forks source link
ami cuda nvidia packer tensorflow

ml-ami-builder

Packer and related scripts for configuring AWS GPU machines with nvidia driver and docker. Users of the AMI should then use the nvidia or Tensorflow docker files which handle installing CUDA, etc.

Latest ami

ami-ef7b9a92 (wyss-mlpe-docker-gpu-2018-02-21T21-06-10Z)

Results for testing ami-ef7b9a92:
c5.xlarge PASS
m4.2xlarge PASS
g3.4xlarge PASS
p3.2xlarge PASS
p3.8xlarge PASS

Overview

Use packer to create an AMI to run nvidia-docker containers like tensorflow:1.4.1-gpu-py3

The packer config gpu-packer.json creates an AMI backed by an Amazon EBS volume on a gp2 SSD drive using the Ubuntu 16.04 AMI ami-d15a75c7as a base.

The config then tells packer to setup the following (2018.02.03):

All bash scripts in repo are and should remain well commented to document the build process.

Requirements:

Usage

  1. Validate the template.

    $ packer validate gpu-packer.json
  2. Build. You'll need your AWS keys.

    $ packer build \
        -var 'aws_access_key=YOUR ACCESS KEY' \
        -var 'aws_secret_key=YOUR SECRET KEY' \
        gpu-packer.json

Acknowledgements

Development is generously supported by AWS Cloud Credits for Research.

Thank you to 4Catalyzer for sharing early versions of these scripts.