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.
Warning
Avoid entering confidential information when assigning descriptions, tags, or friendly names to your cloud resources through the Oracle Cloud Infrastructure Console, API, or CLI.
Prerequisites
An Oracle Cloud Infrastructure tenancy. For more information, see Signing Up for Oracle Cloud Infrastructure.
A cloud network to launch the instance into. For information about setting up cloud networks, see Using the Console in VCNs and Subnets.
A key pair, to use for connecting to the instance via SSH. For information about generating a key pair, see Managing Key Pairs on Linux Instances.
Security group and policy configured for the File Storage service. For more information, see Managing Groups, Getting Started with Policies, and Details for the File Storage Service.
An NGC API key for authenticating with the NGC service.
Log in to the NGC website.
On the NGC Registry page, click Get API Key.
Click Generate API Key and then click Confirm to generate the key. If you have an existing API key it will become invalid once you generate a new key.
Open the Console. See Signing In to the Console for steps to do this.
Click Compute, choose a compartment you have permission to work in, and then click Create Instance.
In the Create Instance dialog box, specify the instance name, and select the availability domain for the instance.
Click Change Image Source.
On the Oracle Images tab, check NVIDIA GPU Cloud Machine Image, review and accept the Agreement for Oracle App "NVIDIA GPU Cloud Machine Image", and then click Select Image.
Select Virtual Machine or Bare Metal Machine for Instance Type.
Select the shape you want to use for Shape.
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.
In the Configure Networking section, select the virtual cloud network (VCN) compartment, VCN, subnet compartment, and subnet.
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.
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 image OCID ocid1.image.oc1..aaaaaaaaknl6phck7e3iuii4r4axpwhenw5qtnnsk3tqppajdjzb5nhoma3q
in InstanceSourceDetails for LaunchInstanceDetails.
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:
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.
Run the following Docker command:
docker login nvcr.io
When prompted for a username, enter $oauthtoken
.
When prompted for a password enter your NGC API key.
At this point you can run Docker commands and access the NGC container registry from the instance.
This sample demonstrates running the MNIST example under PyTorch. This example downloads the MNIST dataset from the web.
Pull and run the PyTorch container with the following Docker commands:
docker pull nvcr.io/nvidia/pytorch:17.10 nvidia-docker run --rm -it nvcr.io/nvidia/pytorch:17.10
Run the MNIST example with the following commands:
cd /opt/pytorch/examples/mnist python main.py
This sample demonstrates running the MNIST example under TensorFlow. This example downloads the MNIST dataset from the web.
Pull and run the TensorFlow container with the following Docker commands:
nvcr.io/nvidia/tensorflow:17.10 nvidia-docker run --rm -it nvcr.io/nvidia/tensorflow:17.10
Run the MNIST_with_summaries example with the following commands:
cd /opt/tensorflow/tensorflow/examples/tutorials/mnist python mnist_with_summaries.py
About Oracle | Contact Us | Legal Notices | Terms of Use | Privacy | Document Conventions |
Copyright © , Oracle and/or its affiliates. All rights reserved.