X

Oracle Artificial Intelligence Blog

How to Set Up a Machine Learning Sandbox on Oracle Cloud

Jeff Schering
User Assistance Developer

I'm going to introduce you to the machine learning capabilities of Oracle Cloud Infrastructure (OCI) Compute. OCI Compute is a GPU-enabled command-line environment, allowing access to NVIDIA's Pascal and Volta GPUs. I'll do that introduction by showing you how to set up a sandbox environment on OCI.

I give you an overview of the process in this post, but you can find detailed instructions in Build a machine learning sandbox on Oracle Cloud, which is an Oracle Solutions doc. Oracle Solutions provide targeted and verified references for solving business problems with Oracle Cloud.

You don't need to be a machine learning expert to be successful with a machine learning sandbox. After all, that's partly what the sandbox is for... to help you get from wherever you are today in your machine learning journey, to being an expert in the future. However, you should at least have the ability to use SSH or PuTTY so that you can connect to your OCI instance, and you should also have some familiarity with using the Linux command line.

The steps are:

  • Select a compute Shape and operating system
  • Set up OCI Compute instance
  • Install Anaconda Distribution
  • Set up one or more sandbox environments

If you don't already have access to OCI, go to go to https://cloud.oracle.com/compute and click the Try for Free button.

Select a compute shape and operating system

You should select a compute shape based on your needs. If you don't know what your needs are just yet, or if you're new to Oracle Cloud, select a CPU shape, one without GPUs. This way, you can get the hang of things without spending a lot of money. If you find you need more horsepower, you can provision another instance, copy your data over from the old instance, and then terminate the old instance.

Set up your OCI Compute instance

Some set up is required on your instance before you can start installing software on it. Out of the box, it allows SSH connections and HTTP egress, which means you can log in and download assets. However, before you can run a web server or other internet-enabled apps such as Jupyter Notebooks, you have to make some changes.

First, you need to modify the Security List for the virtual network that your instance uses. You use the Security List to specify which ports on your instance the network will allow traffic to. For example, you need to allow TCP traffic to port 8888, the default port for Jupyter Notebook.

After that, configure the firewall to open ports on your instance. On Oracle Linux use firewall-cmd to do that. On Ubuntu, the firewall tool that most people use is Uncomplicated Firewall (UFW), but because UFW interferes with some of the other security settings on Oracle Cloud, you're better off using the iptables program instead. Instructions for using iptables to open port 8888 are in the Solution document.

Install Anaconda Distribution

After your instance is set up, you're ready to install Anaconda Distribution. The installation is fairly simple and only takes a few minutes. First, you log into your instance, download the Anaconda set-up script, and then run the script, followed by some house-keeping commands to set up the instance for using separate environments. The details are in the Install Anaconda Distribution section of the Solutions doc.

Set up one or more environments

Now comes the sandbox environment part. You can create more than one environment, and each environment can have its own set of software and data. You create an environment with the conda create command, like this:

conda create --name sandbox

After the sandbox environment is created, you activate it and then start installing software that you need. Follow the Solution doc to install Python and Jupyter Notebook or you could just as easily set up an R environment instead. The following graphic shows an Python‑based environment called sandbox, an R‑based environment called rprojects, and another placeholder environment that just shows that you can have almost as many different environments as you want.

Also, note that the Solutions doc shows you how to use Jupyter Notebook securely by setting up a password and implementing HTTPS access.

This was an introduction to the process of setting up a machine learning sandbox on Oracle Cloud Infrastructure. For the complete details, see the Oracle Solutions doc Build a machine learning sandbox on Oracle Cloud.

For more information on Oracle's AI products and services, please visit our AI website.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.