How To Use the Machine Learning One-Click Install Image on DigitalOcean
How To Use the Machine Learning One-Click Install Image on DigitalOcean
We hope you find this tutorial helpful. In addition to guides like this one, we provide simple cloud infrastructure for developers. Learn more →

How To Use the Machine Learning One-Click Install Image on DigitalOcean

PostedAugust 29, 2017 42k views Data Analysis One-Click Install Apps Machine Learning Python DigitalOcean R Ubuntu Ubuntu 16.04

Status: Archived

This article exists for historical reference and is no longer maintained.

Reason: This Machine Learning One-Click image is no longer offered.

See Instead:

Introduction

Our blog post on the state of artificial intelligence talks about how prevalent AI and machine learning have become. Machine learning, or ML, is a subfield of AI focused on algorithms that learn models from data. ML has become critical not just in developing applications but also in analyzing data to make predictions that inform important business decisions. Because of this, the techniques used in ML are increasingly integrated in the sets of tools that developers use and in the software they write.

This Machine Learning One-Click Application image includes a rich set of tools for data pre-processing, analysis, and visualization, as well as several state of the art libraries to help you get started with machine learning and deep learning.

Specifically, the image includes:

  • Data science tools

    • Python 3.5: A production-ready language with a strong emphasis on machine learning, configured with some of its most popular math, engineering, and data analytics packages.
    • R: A commonly used statistical language, with great plotting tools and statistical packages.
    • Jupyter Notebook: An open-source web application that provides a convenient web interface for interactive coding and computing. Currently, the Jupyter Notebook comes pre-configured with the Python 3 and R kernels.
  • Deep learning tools

    • Theano: A Python library that enables efficient and quick computation on multidimensional arrays. Originally released in 2010 by academic researchers from Montreal, Theano is one of the oldest deep learning framework currently in use.
    • TensorFlow: An open-source deep learning library released in 2015 by Google. It is the most starred ML repository in GitHub.
    • Keras: A wrapper library that provides a simplified interface to the TensorFlow and Theano libraries. Keras is a modular and extensible library that allows for fast prototyping.
    • PyTorch: Another open-source deep learning library often used as an alternative to TensorFlow.
  • Libraries

    • pandas: A Python library for data processing, manipulation, and analysis.
    • scikit-learn: A Python library that contains many traditional ML tools.
    • spaCy and gensim: Popular Python libraries that allow for advanced NLP tasks.
    • dplyr: An R library for data processing.
    • ggplot2: An R library for data visualization.
    • Shiny: A web application framework for R used to create interactive dashboards and applications.

Once you create a Droplet with the ML One-Click, you’ll have an extensive and powerful set of tools at your disposal to experiment, work on personal projects, learn, or develop applications that use ML. This tutorial will walk you through setting up your Droplet based on the ML One-Click Application image and accessing your Jupyter notebook.

Step 1 — Creating a Machine Learning Droplet

To create a Machine Learning Droplet, start on the Droplet creation page. In the Choose an image section, click the One-click apps tab and select the Machine Learning and AI image.

Next, select a size for your Droplet. We recommend at least 2GB of memory for the best performance with this image.

Finally, select your desired region, and any additional settings (like private networking IPv6 support, or backups). Add any SSH keys and fill in a hostname for your Droplet.

When you're ready, click Create Droplet to spin up the server. Once it's created, you can connect to it.

Step 2 — Accessing your ML Droplet via SSH

Log in to your Droplet as the user science (not root) via SSH. If you haven't used SSH or PuTTY before, you can read this How To Connect To Your Droplet with SSH tutorial. Make sure to replace your_server_ip with your Droplet's IP address, which can be found in the Droplets tab.

  • ssh science@your_server_ip

If you are prompted for a password, enter the password that was emailed to you when the Droplet was created and follow the on-screen prompts to replace your temporary password. If you set up the Droplet with SSH keys, the keys will be used for authentication instead.

The Machine Learning One-Click Application automatically sets up a Jupyter Notebook that is directly accessible via your browser. To enhance security, you must use an authentication token to access your Jupyter notebook.

Once you log in, you'll see the Message of the Day, which containers the necessary authentication token as well as the URL you need to access your notebook:

Message of the Day
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-87-generic x86_64)

. . .

------------------------------------------------------------------------
Welcome to the DigitalOcean Machine Learning One-Click!

The "ufw" firewall is enabled. All ports except for 22, 80,
8888 (Juypiter Notebook) and 4000 (ShinyServer) are blocked.

Visit https://do.co/ml to learn more!
------------------------------------------------------------------------


Your login token for the Jupyter Notebook is:
    YOUR_SECRET_TOKEN

To access your Notebook, please go to:
    http://your_server_ip:8888/?token=YOUR_SECRET_TOKEN

If you need to refer back to this later, you can find the information in the file /etc/update-motd.d/99-one-click.

You are now logged into your Machine Learning Droplet. You can run Python or R scripts directly from the CLI, but in the next step, we'll show you to connect to your Jupyter notebook to work interactively.

Step 3 — Accessing Your Jupyter Notebook

To access your Jupyter Notebook, copy and paste the URL from the Message of the Day into your favorite web browser. The URL will look something like http://your_server_ip:8888/?token=YOUR_SECRET_TOKEN.

When you've connected, you will see a screen that lists any running notebooks. There will be no running notebooks to start, but you can create a new one by selecting New and then your preferred language from the pull-down menu in the top right. The Machine Learning One-Click Application image comes with both Python 3.5 and the R kernel, so you can use either.

Next Steps

With your Machine Learning One-Click Application up and running, you can now start working on your own ML projects. From here, you can:

13 Comments

Creative Commons License