using ngc with your nvidia titan pc - nvidia … using ngc with your nvidia titan pc...

10
USING NGC WITH YOUR NVIDIA TITAN PC DU-08832-001_v05 | March 2018 Setup Guide

Upload: duongdieu

Post on 08-May-2018

225 views

Category:

Documents


3 download

TRANSCRIPT

USING NGC WITH YOUR NVIDIATITAN PC

DU-08832-001_v05 | March 2018

Setup Guide

www.nvidia.comUsing NGC with Your NVIDIA TITAN PC DU-08832-001_v05 | ii

TABLE OF CONTENTS

Chapter 1.  Introduction.........................................................................................1Chapter 2. Installing the NVIDIA Driver..................................................................... 2

2.1. Setting Up the Driver Repository...................................................................... 22.2.  Installing the Drivers..................................................................................... 2

Chapter 3. Installing Docker and the Docker Utility Engine for NVIDIA GPUs........................43.1.  Installing the Docker Repository....................................................................... 43.2. Installing the Docker Engine Utility for NVIDIA GPUs and Docker.................................4

Chapter 4. Using NGC Containers.............................................................................6

www.nvidia.comUsing NGC with Your NVIDIA TITAN PC DU-08832-001_v05 | 1

Chapter 1.INTRODUCTION

NVIDIA® GPU Cloud (NGC) containers leverage the power of GPUs based on theNVIDIA Pascal™ and Volta™ architecture. NVIDIA DGX systems as well as Volta andPascal-based virtual machines hosted on cloud service providers utilize these GPUs.

Aside from these classes of hardware, NGC containers can also run on PCs installedwith the following NVIDIA products:

‣ NVIDIA TITAN V (Volta)‣ NVIDIA TITAN X (Pascal)‣ NVIDIA TITAN Xp (Pascal)‣ NVIDIA Quadro GV100 (Volta)‣ NVIDIA Quadro GP100 (Pascal)‣ NVIDIA Quadro P6000 (Pascal)

The document describes how to set up an NVIDIA TITAN PC to run NGC containers.Open the command line on the Ubuntu desktop and paste the code blocks into thecommand line.

Prerequisites

These instructions assume the following:

‣ You have a single card from the supported list installed on your PC.‣ You have Ubuntu Desktop 16.04 with 4.10 kernel installed. Ubuntu Desktop can be

downloaded from https://www.ubuntu.com/download/desktop/.

www.nvidia.comUsing NGC with Your NVIDIA TITAN PC DU-08832-001_v05 | 2

Chapter 2.INSTALLING THE NVIDIA DRIVER

NGC containers take advantage of the power of NVIDIA GPUs. Be sure your system isinstalled with the appropriate NVIDIA drivers.

2.1. Setting Up the Driver RepositoryInstall the NVIDIA Developer repository in preparation for installing the NVIDIAdriver. The following code block

1. Installs apt-transport-https. 2. Installs curl. 3. Sets up the /etc/apt/sources.list.d/cuda.list file. 4. Installs the CUDA repository key. 5. Raises the priority for the NVIDIA repository.

sudo apt-get install -y apt-transport-https curlcat <<EOF | sudo tee /etc/apt/sources.list.d/cuda.list > /dev/nulldeb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /EOF

curl -s \ https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub \ | sudo apt-key add -

cat <<EOF | sudo tee /etc/apt/preferences.d/cuda > /dev/nullPackage: *Pin: origin developer.download.nvidia.comPin-Priority: 600EOF

2.2. Installing the Drivers

1. Once the repository has been set up, install the NVIDIA driver packages and reboot.

Installing the NVIDIA Driver

www.nvidia.comUsing NGC with Your NVIDIA TITAN PC DU-08832-001_v05 | 3

sudo apt-get update && sudo apt-get install -y --no-install-recommends cuda-driverssudo reboot

2. Upon reboot, confirm that you can see your installed NVIDIA hardware in thenvidia-smi output.

nvidia-smi

Example output (TITAN card in bold):+-----------------------------------------------------------------------------+| NVIDIA-SMI 384.90 Driver Version: 384.90 ||-------------------------------+----------------------+----------------------+| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC || Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. ||===============================+======================+======================|| 0 TITAN X (Pascal) Off | 00000000:02:00.0 On | N/A || 23% 30C P8 10W / 250W | 468MiB / 12188MiB | 0% Default |+-------------------------------+----------------------+----------------------+

www.nvidia.comUsing NGC with Your NVIDIA TITAN PC DU-08832-001_v05 | 4

Chapter 3.INSTALLING DOCKER AND THE DOCKERUTILITY ENGINE FOR NVIDIA GPUS

The Docker runtime is required to run NGC containers. In addition, the Docker EngineUtility for NVIDIA GPUs (nvidia-docker2) ensures that the high performance power ofthe GPU is leveraged when running NVIDIA-optimized Docker containers.

3.1. Installing the Docker RepositoryThe following code block will install the "docker-ce" repository. Refer to https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-docker-ce for moreinformation.

The following code block

1. Installs the Docker prerequisites. 2. Adds the Docker official GPG key. 3. Adds the official stable Docker repository.

sudo apt-get install -y ca-certificates curl software-properties-commoncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

3.2. Installing the Docker Engine Utility for NVIDIAGPUs and Docker 1. Issue the following commands to install the Docker Engine Utility (nvidia-docker2)

repository, install nvidia-docker2, and then set up permissions to use Dockerwithout sudo each time.curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \ sudo apt-key add -

Installing Docker and the Docker Utility Engine for NVIDIA GPUs

www.nvidia.comUsing NGC with Your NVIDIA TITAN PC DU-08832-001_v05 | 5

curl -s -L https://nvidia.github.io/nvidia-docker/ubuntu16.04/amd64/nvidia-docker.list | \ sudo tee /etc/apt/sources.list.d/nvidia-docker.listsudo apt-get updatesudo apt-get install -y nvidia-docker2sudo usermod -aG docker $USER

For more information, see https://github.com/NVIDIA/nvidia-docker. 2. Reboot the system.

sudo reboot

3. Upon reboot, test nvidia-smi with the latest official CUDA image.a) Log in to the NGC container registry using the following command.

docker login nvcr.io

You will be prompted to enter a Username and Password. Type “$oauthtoken”exactly as shown, and enter your NGC API key obtained during NGC accountsetup:

Username: $oauthtoken

Password: <Your NGC API Key>b) Test nvidia-smi.

docker run --runtime=nvidia --rm nvcr.io/nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04 nvidia-smi

www.nvidia.comUsing NGC with Your NVIDIA TITAN PC DU-08832-001_v05 | 6

Chapter 4.USING NGC CONTAINERS

Make sure you have performed the following steps from the NGC website (see the NGCGetting Started Guide)

‣ Signed up for an NGC account at https://ngc.nvidia.com/signup.‣ Created an NGC API key for access to the NGC container registry.‣ Browsed the NGC website and identified an available NGC container and tag to run.

See the following documents for detailed instructions on using NGC Containers.

‣ NGC Container User Guide‣ Using Deep Learning Containers

Notice

THE INFORMATION IN THIS GUIDE AND ALL OTHER INFORMATION CONTAINED IN NVIDIA DOCUMENTATION

REFERENCED IN THIS GUIDE IS PROVIDED “AS IS.” NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED,

STATUTORY, OR OTHERWISE WITH RESPECT TO THE INFORMATION FOR THE PRODUCT, AND EXPRESSLY

DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A

PARTICULAR PURPOSE. Notwithstanding any damages that customer might incur for any reason whatsoever,

NVIDIA’s aggregate and cumulative liability towards customer for the product described in this guide shall

be limited in accordance with the NVIDIA terms and conditions of sale for the product.

THE NVIDIA PRODUCT DESCRIBED IN THIS GUIDE IS NOT FAULT TOLERANT AND IS NOT DESIGNED,

MANUFACTURED OR INTENDED FOR USE IN CONNECTION WITH THE DESIGN, CONSTRUCTION, MAINTENANCE,

AND/OR OPERATION OF ANY SYSTEM WHERE THE USE OR A FAILURE OF SUCH SYSTEM COULD RESULT IN A

SITUATION THAT THREATENS THE SAFETY OF HUMAN LIFE OR SEVERE PHYSICAL HARM OR PROPERTY DAMAGE

(INCLUDING, FOR EXAMPLE, USE IN CONNECTION WITH ANY NUCLEAR, AVIONICS, LIFE SUPPORT OR OTHER

LIFE CRITICAL APPLICATION). NVIDIA EXPRESSLY DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS

FOR SUCH HIGH RISK USES. NVIDIA SHALL NOT BE LIABLE TO CUSTOMER OR ANY THIRD PARTY, IN WHOLE OR

IN PART, FOR ANY CLAIMS OR DAMAGES ARISING FROM SUCH HIGH RISK USES.

NVIDIA makes no representation or warranty that the product described in this guide will be suitable for

any specified use without further testing or modification. Testing of all parameters of each product is not

necessarily performed by NVIDIA. It is customer’s sole responsibility to ensure the product is suitable and

fit for the application planned by customer and to do the necessary testing for the application in order

to avoid a default of the application or the product. Weaknesses in customer’s product designs may affect

the quality and reliability of the NVIDIA product and may result in additional or different conditions and/

or requirements beyond those contained in this guide. NVIDIA does not accept any liability related to any

default, damage, costs or problem which may be based on or attributable to: (i) the use of the NVIDIA

product in any manner that is contrary to this guide, or (ii) customer product designs.

Other than the right for customer to use the information in this guide with the product, no other license,

either expressed or implied, is hereby granted by NVIDIA under this guide. Reproduction of information

in this guide is permissible only if reproduction is approved by NVIDIA in writing, is reproduced without

alteration, and is accompanied by all associated conditions, limitations, and notices.

www.nvidia.com

Trademarks

NVIDIA, the NVIDIA logo, and Volta are trademarks and/or registered trademarks of NVIDIA Corporation in

the Unites States and other countries.

Docker and the Docker logo are trademarks or registered trademarks of Docker, Inc. in the United States

and/or other countries.

Other company and product names may be trademarks of the respective companies with which they are

associated.

Copyright

© 2018 NVIDIA Corporation. All rights reserved.

www.nvidia.com