nvidia digits installation... nvidia digits installation du-09200-001 _v1.0 | 3 chapter 3. building...

12
NVIDIA DIGITS INSTALLATION DU-09200-001 _v1.0 | October 2019 Guide

Upload: others

Post on 14-Mar-2020

33 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: NVIDIA DIGITS Installation... NVIDIA DIGITS Installation DU-09200-001 _v1.0 | 3 Chapter 3. BUILDING DIGITS Use the instructions in this chapter to guide you through the process of

NVIDIA DIGITS INSTALLATION

DU-09200-001 _v1.0 | October 2019

Guide

Page 2: NVIDIA DIGITS Installation... NVIDIA DIGITS Installation DU-09200-001 _v1.0 | 3 Chapter 3. BUILDING DIGITS Use the instructions in this chapter to guide you through the process of

www.nvidia.comNVIDIA DIGITS Installation DU-09200-001 _v1.0 | ii

TABLE OF CONTENTS

Chapter 1. Overview of DIGITS................................................................................1Chapter 2.  Installing DIGITS....................................................................................2Chapter 3. Building DIGITS..................................................................................... 3

3.1. Dependencies.............................................................................................. 33.1.1. Building Caffe........................................................................................ 3

3.1.1.1. Dependencies................................................................................... 33.1.1.2. Downloading Source........................................................................... 43.1.1.3.  Installing Python Packages....................................................................43.1.1.4. Building.......................................................................................... 4

3.1.2. Building TensorFlow................................................................................. 43.1.2.1. Requirements................................................................................... 53.1.2.2.  Installation...................................................................................... 53.1.2.3. Getting Started With TensorFlow In DIGITS................................................5

3.1.3. Protobuf............................................................................................... 53.1.3.1. Dependencies................................................................................... 53.1.3.2. Download Source............................................................................... 63.1.3.3. Building Protobuf...............................................................................6

Chapter 4. Starting the server................................................................................ 7Chapter 5. Getting Started.....................................................................................8Chapter 6. Troubleshooting.................................................................................... 9

6.1.  Support..................................................................................................... 9

Page 3: NVIDIA DIGITS Installation... NVIDIA DIGITS Installation DU-09200-001 _v1.0 | 3 Chapter 3. BUILDING DIGITS Use the instructions in this chapter to guide you through the process of

www.nvidia.comNVIDIA DIGITS Installation DU-09200-001 _v1.0 | 1

Chapter 1.OVERVIEW OF DIGITS

DIGITS (the Deep Learning GPU Training System) is a webapp for training deeplearning models. The currently supported frameworks are: Caffe, Torch, and Tensorflow.DIGITS puts the power of deep learning into the hands of engineers and data scientists.

DIGITS is not a framework. DIGITS is a wrapper for Caffe, Torch, and TensorFlow;which provides a graphical web interface to those frameworks rather than dealing withthem directly on the command-line.

DIGITS can be used to rapidly train highly accurate deep neural network (DNNs) forimage classification, segmentation, object detection tasks, and more. DIGITS simplifiescommon deep learning tasks such as managing data, designing and training neuralnetworks on multi-GPU systems, monitoring performance in real time with advancedvisualizations, and selecting the best performing model from the results browser fordeployment. DIGITS is completely interactive so that data scientists can focus ondesigning and training networks rather than programming and debugging.

DIGITS is available through multiple channels such as:

‣ GitHub download‣ NVIDIA’s Docker repository, nvcr.io

This guide walks you through getting up-and-running with DIGITS . To install theDIGITScontainer, see the Nvidia DIGITS Container Getting Started Guide.

Page 4: NVIDIA DIGITS Installation... NVIDIA DIGITS Installation DU-09200-001 _v1.0 | 3 Chapter 3. BUILDING DIGITS Use the instructions in this chapter to guide you through the process of

www.nvidia.comNVIDIA DIGITS Installation DU-09200-001 _v1.0 | 2

Chapter 2.INSTALLING DIGITS

You can download DIGITS from GitHub at this location:

https://github.com/NVIDIA/DIGITS/releases

For more information about downloading, running, and using DIGITS, see: NVIDIADIGITS: Interactive Deep Learning GPU Training System.

Page 5: NVIDIA DIGITS Installation... NVIDIA DIGITS Installation DU-09200-001 _v1.0 | 3 Chapter 3. BUILDING DIGITS Use the instructions in this chapter to guide you through the process of

www.nvidia.comNVIDIA DIGITS Installation DU-09200-001 _v1.0 | 3

Chapter 3.BUILDING DIGITS

Use the instructions in this chapter to guide you through the process of building thelatest version of DIGITS from the source for installation on Ubuntu 14.04 and 16.04.

Alternatively, see Nvidia DIGITS with Caffe Getting Started Guide for setting up DIGITSand Caffe on Windows machines.

Other platforms are not officially supported, but users have successfully installedDIGITS on Ubuntu 12.04, CentOS, OSX, and possibly more. Since DIGITS itself is apure Python project, installation is usually pretty trivial regardless of the platform.The difficulty comes from installing all the required dependencies for Caffe, Torch7 ,Tensorflow, and configuring the builds.

3.1. DependenciesInstall some dependencies with Deb packages:sudo apt-get install --no-install-recommends git graphviz python-dev python-flask python-flaskext.wtf python-gevent python-h5py python-numpy python-pil python-pip python-scipy python-tk

Follow 3.2.1 to build Caffe (required).

Follow these instructions to build Tensorflow (suggested).

Follow 3.2.3 to build Torch7 (suggested).

3.1.1. Building CaffeDIGITS requires a build of Caffe. We officially only support recent releases fromNVIDIA/caffe (NVcaffe), but any recent build of BVLC/caffe will probably work too.

3.1.1.1. Dependencies

Before Caffe can be build, Protobuf 3 needs to be build. Follow 3.3 to build Protobuf 3

For best performance, you'll want:

Page 6: NVIDIA DIGITS Installation... NVIDIA DIGITS Installation DU-09200-001 _v1.0 | 3 Chapter 3. BUILDING DIGITS Use the instructions in this chapter to guide you through the process of

Building DIGITS

www.nvidia.comNVIDIA DIGITS Installation DU-09200-001 _v1.0 | 4

‣ One or more NVIDIA GPUs (details)‣ An NVIDIA driver, see Installing Cuda and the Nvidia Driver for DIGITS.‣ A CUDA toolkit, see Installing Cuda and the Nvidia Driver for DIGITS.‣ cuDNN (download page)

Install some dependencies with Deb packages:sudo apt-get install --no-install-recommends build-essential cmake git gfortran libatlas-base-dev libboost-filesystem-dev libboost-python-dev libboost-system-dev libboost-thread-dev libgflags-dev libgoogle-glog-dev libhdf5-serial-dev libleveldb-dev liblmdb-dev libopencv-dev libsnappy-dev python-all-dev python-dev python-h5py python-matplotlib python-numpy python-opencv python-pil python-pip python-pydot python-scipy python-skimage python-sklearn

3.1.1.2. Downloading Source

DIGITS is currently compatible with Caffe 0.15

# example location - can be customizedexport CAFFE_ROOT=~/caffegit clone https://github.com/NVIDIA/caffe.git $CAFFE_ROOT -b 'caffe-0.15'

Setting the CAFFE_ROOT environment variable will help DIGITS automatically detectyour Caffe installation, but this is optional.

3.1.1.3. Installing Python Packages

Several PyPI packages need to be installed:

sudo pip install -r $CAFFE_ROOT/python/requirements.txt

If you receive errors on missing imports, then use this command to install the packagesin order (see discussion here):cat $CAFFE_ROOT/python/requirements.txt | xargs -n1 sudo pip install

3.1.1.4. Building

We recommend using CMake to configure Caffe rather than the raw Makefile build forautomatic dependency detection:

cd $CAFFE_ROOTmkdir buildcd buildcmake ..make -j"$(nproc)"make install

3.1.2. Building TensorFlowDIGITS now supports TensorFlow as an optional alternative backend to Caffe or Torch.

Installation for Ubuntu

Installation for Mac

Page 7: NVIDIA DIGITS Installation... NVIDIA DIGITS Installation DU-09200-001 _v1.0 | 3 Chapter 3. BUILDING DIGITS Use the instructions in this chapter to guide you through the process of

Building DIGITS

www.nvidia.comNVIDIA DIGITS Installation DU-09200-001 _v1.0 | 5

3.1.2.1. Requirements

DIGITS is currently targeting tensorflow-gpu V1.2.1.

TensorFlow for DIGITS requires one or more NVIDIA GPUs with CUDA ComputeCapbility of 3.0 or higher. See the official GPU support list to see if your GPU supports it.

Along with that requirement, the following should be installed.

‣ One or more NVIDIA GPUs (details)‣ An NVIDIA driver, see Installing Cuda and the Nvidia Driver for DIGITS.‣ A CUDA toolkit, see Installing Cuda and the Nvidia Driver for DIGITS.‣ cuDNN 5.1 (download page)

Currently tensorflow v1.2.1 targets cuDNN 5.1. To have tensorflow v1.2.1 running indigits, you must have cuDNN 5.1 installed. To install it, use the following command ina terminal:sudo apt-get install libcudnn5

3.1.2.2. Installation

These instructions are based on [the official TensorFlow instructions] (https://www.tensorflow.org/versions/master/install/)

TensorFlow comes with pip, to install it, just simply use the commandpip install tensorflow-gpu==1.2.1

TensorFlow should then install effortlessly and pull in all its required dependencies.

3.1.2.3. Getting Started With TensorFlow In DIGITS

See the Nvidia DIGITS TensorFlow Getting Started Guide for information on gettingstarted with TensorFlow in DIGITS.

3.1.3. ProtobufTo run Caffe and Tensorflow inside DIGITS side by side, Protobuf 3 must be builtfrom source. Caffe can be installed from debian packages but if it were to be run withtensorflow, some features such as python layers will not work properly. It is highlysuggested to build protobuf from source to ensure DIGITS to work properly.

This guide is based on Google's Protobuf installation guide.

3.1.3.1. Dependencies

These Deb packages must be installed to build Protobuf 3:

sudo apt-get install autoconf automake libtool curl make g++ git python-dev python-setuptools unzip

Page 8: NVIDIA DIGITS Installation... NVIDIA DIGITS Installation DU-09200-001 _v1.0 | 3 Chapter 3. BUILDING DIGITS Use the instructions in this chapter to guide you through the process of

Building DIGITS

www.nvidia.comNVIDIA DIGITS Installation DU-09200-001 _v1.0 | 6

3.1.3.2. Download Source

DIGITS is currently compatible with Protobuf 3.2.x

# example location - can be customizedexport PROTOBUF_ROOT=~/protobufgit clone https://github.com/google/protobuf.git $PROTOBUF_ROOT -b '3.2.x'

3.1.3.3. Building Protobuf

cd $PROTOBUF_ROOT./autogen.sh./configuremake "-j$(nproc)"make installldconfigcd pythonpython setup.py install --cpp_implementation

This will ensure that Protobuf 3 is installed.

Page 9: NVIDIA DIGITS Installation... NVIDIA DIGITS Installation DU-09200-001 _v1.0 | 3 Chapter 3. BUILDING DIGITS Use the instructions in this chapter to guide you through the process of

www.nvidia.comNVIDIA DIGITS Installation DU-09200-001 _v1.0 | 7

Chapter 4.STARTING THE SERVER

Using this command./digits-devserver

starts a DIGITS Server at http://localhost:5000/.$ ./digits-devserver --helpusage: __main__.py [-h] [-p PORT] [-d] [--version]

DIGITS development serveroptional arguments: -h, --help show this help message and exit -p PORT, --port PORT Port to run app on (default 5000) -d, --debug Run the application in debug mode (reloads when the source changes and gives more detailed error messages) --version Print the version number and exit

After getting DIGITS set up, the DIGITS server should now be running at http://localhost:5000.

Page 10: NVIDIA DIGITS Installation... NVIDIA DIGITS Installation DU-09200-001 _v1.0 | 3 Chapter 3. BUILDING DIGITS Use the instructions in this chapter to guide you through the process of

www.nvidia.comNVIDIA DIGITS Installation DU-09200-001 _v1.0 | 8

Chapter 5.GETTING STARTED

Once DIGITS has been successfully installed, see the Nvidia DIGITS Getting StartedGuide to proceed.

Page 11: NVIDIA DIGITS Installation... NVIDIA DIGITS Installation DU-09200-001 _v1.0 | 3 Chapter 3. BUILDING DIGITS Use the instructions in this chapter to guide you through the process of

www.nvidia.comNVIDIA DIGITS Installation DU-09200-001 _v1.0 | 9

Chapter 6.TROUBLESHOOTING

For troubleshooting tips, see the Nvidia DIGITS Troubleshooting and Support Guide.

6.1. SupportFor the latest Release Notes, see the DIGITS Release Notes Documentation website(http://docs.nvidia.com/deeplearning/digits/digits-release-notes/index.html ).

For more information about DIGITS, see:

‣ DIGITS website (https://developer.nvidia.com/digits )‣ DIGITS project (https://github.com/NVIDIA/DIGITS/blob/digits-5.0/README.md )‣ GitHub documentation (https://github.com/NVIDIA/nvidia-docker/wiki/DIGITS )

There may be slight variations between the NVIDIA-docker images and this image.

Page 12: NVIDIA DIGITS Installation... NVIDIA DIGITS Installation DU-09200-001 _v1.0 | 3 Chapter 3. BUILDING DIGITS Use the instructions in this chapter to guide you through the process of

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.

Trademarks

NVIDIA, the NVIDIA logo, and cuBLAS, CUDA, cuDNN, DALI, DIGITS, DGX, DGX-1, DGX-2, DGX Station, DLProf,

Jetson, Kepler, Maxwell, NCCL, Nsight Compute, Nsight Systems, NvCaffe, PerfWorks, Pascal, SDK Manager,

Tegra, TensorRT, TensorRT Inference Server, Tesla, TF-TRT, and Volta are trademarks and/or registered

trademarks of NVIDIA Corporation in the U.S. and other countries. Other company and product names may

be trademarks of the respective companies with which they are associated.

Copyright

© 2019 NVIDIA Corporation. All rights reserved.

www.nvidia.com