Install GraphLab Create on AWS for Coursera Students

Graphlab Create requires an academic license to use. Non-academic users may consider using the open source Turi Create package.




The below instructions are intended for participants of the Coursera Machine Learning Specialization course who would like to use GraphLab Create with jupyter (IPython Notebook) in the Cloud. However, everyone is welcome to try this approach and our included tutorials. You will need a to create a free AWS account. There is no cost to get started but be aware charges will be applied to your AWS account if you exceed usage of the AWS Free Tier. See AWS Free Usage Tier FAQ. If you need additional help, visit the Turi forum.



Step 1: Sign in to https://console.aws.amazon.com/


If you do not have an AWS account, create one for free now.


Step 2: Launch an EC2 instance with the GraphLab Create AMI


  1. In the AWS Management Console, under Compute, select "EC2".
  2. In the EC2 Dashboard, under Instances, select "Instances".
  3. Select "Launch Instance".
  4. On the left navigation, select "Community AMIs".
  5. Search for graphlab-create-2.1-coursera-1, then "Select" this instance.
  6. Select Type t2.micro for use on the free tier. Any type can be selected.
  7. Select "Review and Launch" or if prefered, optionally you can Configure Instance Details.
  8. On the Review Instance Launch page, select "Edit Security Groups".
  9. Select "Add Rule":
    • Type: Custom TCP Rule
    • Protocol: TCP
    • Port Range: 8888
    • Source: Anywhere
    • Select Review and Launch
    • Select Launch
  10. Select "Launch".
  11. Select Proceed without key pair, select checkbox, then select "Launch Instances".
  12. Select "View Instances". It will take a moment to launch the EC2 instance.

Step 3: Launch jupyter (IPython) notebook on your EC2 instance


  1. In the description of your new EC2 instance, find the Public IP address
  2. In a browser, browse to http://public ip address:8888/tree
  3. NOTE: The EC2 instance must be running to obtain IP address. This takes a few moments to boot. IP address will change upon every launch.

Step 4: Set your personal GraphLab Create product key


  1. Open a new notebook by selecting New and Python 2
  2. You will now be in a jupyter Python environment that includes GraphLab Create version 2.1
  3. Set your GraphLab Create product key using the GraphLab Create API
  4. # set product key
    import graphlab
    graphlab.product_key.set_product_key('your product key here')

    # output active product key
    graphlab.product_key.get_product_key()

IMPORTANT: When you are done working, stop the EC2 instance to preserve your free EC2 usage hours

  1. Under Action > Instance State > Stop. Stopping will retain changes to your work (terminating will clear changes and remove the instance).


FAQ


Q: Can I download my notebooks?

Yes. In the notebook you want to download, select File > Download as > IPython Notebook (.ipynb)


Q: How do I use my own data with GraphLab Create when jupyter is hosted on EC2?

NOTE: data storage counts against your Free Tier usage limits.


Option 1: You can upload files directly into EC2 using jupyter.

  1. On http://public ip address:8888 page, select Upload. Select your file. Select Upload.
# example of loading csv into SFrame
import graphlab
sf = graphlab.SFrame('your_data.csv')

Option2: Upload data to AWS S3

  1. In the AWS Management Console, under Storage & Content Delivery, select S3.
  2. Select Create Bucket
  3. Enter a bucket name. Select Region (ideally the same as your EC2 region). Your bucket will be created.
  4. Select new bucket. Select Actions > Upload. Select Add Files. Select Start Upload. Wait for upload to succeed.
  5. Select the file. Select Properties. Under Permissions, Select Add more permissions.
    • Grantee: Everyone
    • Check Open/Download
    • Select Save
  6. Find Link in Properties. This is the public URL to this file that you can use directly in GraphLab Create.
# example of loading csv into SFrame from S3
import graphlab
sf = graphlab.SFrame('https://s3.../your_data.csv')