Skip to content

Project with AWS CloudFormation templates to provision SageMaker notebooks setup to work with fast.ai

License

Notifications You must be signed in to change notification settings

mattmcclean/sagemaker-fastai-notebook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SageMaker fast.ai notebook

Example project showing how to create a SageMaker notebook instance with the fast.ai library and course notebooks installed.

The notebook is designed to work with either v 0.7 or v 1.0 of the fastai library. v 0.7 should be used if you are taking 2nd edition of Practical Deep Learning For Coders released online in early 2018. v 1.0 should be selected if you are taking the 3rd edition of Practical Deep Learning For Coders that will be released online to the general public early 2019.

Setup

Follow the instructions below to setup your IAM role, SageMaker Notebook Lifecycle Configuration, SNS Topic and SageMaker Notebook Instance.

We will use CloudFormation to create our resources via a template file. To do this,

  1. Click the Launch Template button in the table below selecting the region closest to you. It will open the AWS CloudFormation Web Console a create a new CloudFormation stack.
Region Name Launch link
US West (Oregon) Region us-west-2 CloudFormation
US East (N. Virginia) Region us-east-1 CloudFormation
US East (Ohio) Region us-east-2 CloudFormation
Asia Pacific (Tokyo) Region ap-northeast-1 CloudFormation
Asia Pacific (Seoul) Region ap-northeast-2 CloudFormation
Asia Pacific (Sydney) Region ap-southeast-2 CloudFormation
EU (Ireland) Region eu-west-1 CloudFormation
EU (Frankfurt) Region eu-central-1 CloudFormation
  1. There are a few parameters you will need to fill in including the instance type, fastai library version and email address. The default instance type is ml.p2.xlarge as this is required to train the fast.ai models quickly. The ml.t2.medium option is part of the AWS Free Tier. See the SageMaker pricing page for more details. Valid options are for the fast.ai library are 0.7 and 1.0. The default option is 1.0. You will need to enter your email address to receive a notification when the fastai environment has been installed correctly. Tick the option box to acknowledge that IAM resources will be created and then click the Create button to create the stack. gi Screenshot

You will now see a CloudFormation create stack screenshot like the one shown below:

Screenshot

Take note of the resources being created including:

  • IAM service role allowing SageMaker access various AWS services
  • SageMaker Notebook Lifecycle Config scripts that are run when the SageMaker Notebook is created and started.
  • SageMaker Notebook Instance to run the fast.ai MOOC course notebooks.
  • SNS Topic to receive an email notification when the notebook is setup correctly with the fastai library and dependencies.

About 5 minutes or so should pass then the CloudFormation stack should move to the state CREATE_COMPLETE like the screenshot below.

Screenshot

  1. You will need to confirm the subscription to the SNS topic by checking the inbox of the email address supplied. Click the Confirm subscription link in the email to receive the notification email later.

Screenshot

  1. Wait for up to 15 minutes to have all of the fastai libraries installed on the SageMaker notebook instance. When it has done you will receive an email with a link to the notebook instance as per the screenshot below.

Screenshot

  1. Click on the tinyurl.com based shortened link to open the Jupyter notebook web console.

Screenshot

About

Project with AWS CloudFormation templates to provision SageMaker notebooks setup to work with fast.ai

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published