Oracle Cloud Infrastructure Documentation

Using NVIDIA GPU Cloud with Oracle Cloud Infrastructure

NVIDIA GPU Cloud (NGC) is a GPU-accelerated cloud platform optimized for deep learning and scientific computing. This topic provides an overview of how to use NGC with Oracle Cloud Infrastructure.

NVIDIA makes available on Oracle Cloud Infrastructure a customized Compute image optimized for the NVIDIA® Tesla Volta™ and Pascal™ GPUs . Running NGC containers on this instance provides optimum performance for deep learning jobs.

For those familiar with Oracle Cloud Infrastructure, to use NGC, you need to log into the Console, configure the settings as needed, and then create an instance based on the NGC image by specifying the image OCID. After launching the instance, you can SSH into the instance and start running deep learning jobs using framework containers from the NGC container registry.

Prerequisites

To generate your NGC API key

Launching an instance based on the NGC image

Using the Console

  1. Open the Console, see Signing In to the Console for steps on how to do this.

  2. Click Compute, choose a compartment you have permission to work in, and then click Create Instance.

  3. In the Create Instance dialog box, specify the instance name, and select the availability domain for the instance.

  4. Select Image OCID for Boot Volume.

  5. Specify the image OCID applicable to your region as the Image OCID.

    Region Image OCID
    us-ashburn-1 ocid1.image.oc1.iad.aaaaaaaaikn6ub6heefqxbe5fkiv4otbfe6ivza6y7di5khnkxkyvf2bkdta
    eu-frankfurt-1 ocid1.image.oc1.eu-frankfurt-1.aaaaaaaauwuafl6uze6bnusphnn6y2mr5y7ajavx4kza7glyrqggxlnbo4zq
  6. Select Bare Metal Machine for Shape Type.

  7. Select the shape you want to use for Shape.

  8. For SSH Keys, click Choose SSH Key File, navigate to the location where you saved the public key portion (.pub) of the SSH key file you created, select the file and click Open.

  9. Select a virtual cloud network, and then click Create Instance.

You should now see the NGC instance with the status of Provisioning. Once the status has changed to Running, you can connect to the instance. For general information about launching Compute instances, see Creating an Instance.

See the following topics for accessing and working with the instance:

When you connect to the instance using SSH you will be prompted for the NGC API key. If you supply the API key at the prompt, the instance will automatically log you into the NGC container registry so that you can run containers from the registry. You can choose not to supply the API key at the prompt and still log in to the instance. You can then log in later to the NGC container registry, see Logging in to the NGC Container Registry for more information.

Using the CLI

Oracle Cloud Infrastructure provides a Command Line Interface (CLI) you can use to complete tasks. For more information, see Quickstart and Configuration. Use the launch command to create an instance, specifying image for sourceType and the applicable image OCID from the table below for imageId in InstanceSourceDetails for LaunchInstanceDetails.

Region Image OCID
us-ashburn-1 ocid1.image.oc1.iad.aaaaaaaaikn6ub6heefqxbe5fkiv4otbfe6ivza6y7di5khnkxkyvf2bkdta
eu-frankfurt-1

ocid1.image.oc1.eu-frankfurt-1.aaaaaaaauwuafl6uze6bnusphnn6y2mr5y7ajavx4kza7glyrqggxlnbo4zq

To start and stop the instance with the CLI, use the action command. Use the terminate command to terminate the instance.

Using the File Storage Service for Persistent Data Storage

You can use the Overview of File Storage for data storage when working with NGC. See the following tasks for creating and working with the File Storage service:

Using the Block Volume Service for Persistent Data Storage

You can use the Block Volume service for data storage when working with NGC. For more information, see Overview of Block Volume. See the following tasks for creating and working with the Block Volume service:

You can also use the CLI to manage block volumes, see the volume commands.

Examples of Running Containers

You first need to log into the NGC container registry. You can skip this section if you provided your API key when logging into the instance via SSH. If you did not provide your API key when connecting to your instance, then you must perform this step.

To log into the NGC container registry

At this point you can run Docker commands and access the NGC container registry from the instance.

Example: MNIST Training Run Using PyTorch Container
Example: MNIST Training Run Using TensorFlow Container