Puget Systems print logo
Read this article at https://www.pugetsystems.com/guides/783
Dr Donald Kinghorn (Scientific Computing Advisor)


Written on March 28, 2016 by Dr Donald Kinghorn

Introduction to NVIDIA DIGITS

The NVIDIA Deep Learning GPU Training System (DIGITS) is a collection of tools for exploring "Deep Neural Networks" together with a useful web interface. It includes NVIDIA's optimized version of Berkeley Vision and Learning Center's Caffe deep learning framework and experimental support for the Torch Lua framework. It bundles the https://developer.nvidia.com/deep-learning-software NVIDIA tools for deep learning including cuDNN, cuBLAS, cuSPARCE, NCCL, and of course the CUDA tool kit.  There is easy access to the MNIST digits dataset, (provided by Yann LeCun ) and Alex Krizhevsky's CIFAR10 and CIFAR100 image datasets. There are network configuration files for LeNet-5, AlexNet and LeGoogleNet. The web interface provides means for setting up training and test datasets, selection and configuration of training models, job control with visualization and tools for testing trained models. Nicely done!

If you are experienced with, or simply curious about, image classification with deep neural networks then it is probably worth your effort to explore DIGITS. Fortunately NVIDIA has made it remarkably easy to get started. The entire stack can be installed on an Ubuntu 14.04 Linux based system with a few simple commands.

For experienced developers that have an established development environment or novices that just want to check out what NVIDIA has put together I would recommend that you do a fresh Linux install and set-up so that you don't clobber your existing environment. If you don't have the luxury of a secondary hardware platform to experiment with then I would suggest picking up an extra SSD to do an install on and then do simple boot switching from your motherboards BIOS. After you see what you have available from a DIGITS install you can then decide it you want to roll all or part of it into your main system environment.

In general for researchers, developers (and users on Linux platforms other than Ubuntu 14.04) I would recommend that you build your tool chain from source. Source for most of NVIDIA DIGITS is freely available, documented with most of the code is on their GitHub site. A productive development environment can be a precious and delicate thing so be careful and thoughtful ... and keep backups of anything you care about!        


The base hardware platform for a DIGITS install could be most any functional system as long as it supports a recent NVIDIA graphics card. I would highly recommend a current generation 900 series GPU. The Titan X is the preferred card and yes, it is marvelous! 4 of them is 4 times more marvelous :-)  What hardware you use will depend on your commitment and budget. If you are using old hardware then give yourself a treat and get at least a new video card. [ I personally like the GTX970 as an affordable, good performing card. If the memory clock "issue" bothers you then a GTX960 is great too. If you want to go higher end then I would recommend spending the extra money to get a GTX980Ti rather than a GTX980 since it offers a lot more performance for not that much more cost. But, if you can afford it a Titan X is great! ]

The  Puget Systems Peak Single with 4 Titan X GPU's is our reference DIGITS box and Machine Learning development platform. It is a very solid computing platform with excellent power and cooling, quiet operation and full support for 4 Titan X GPU's at PCIe v3 X16. We also have the Peak 2U dual Xeon, 4 x GPU or Peak 3U dual Xeon, 8 x GPU systems for production workloads. 

We will have the Peak Single with 4 Titan X cards running at GTC 2016 next week. We will have it training an image classifier convolution network using 2 of the Titan X's AND running a Molecular Dynamics simulation on the other two Titan X's at the same time! We'll have our high-end laptop there running an Ubuntu 16.04 beta install with a CUDA setup too ... good stuff, hope to see you there!

The hardware for the install I'm outlining below is just a test-bed on my bench using the base components from our Peak Single together with a GTX980 and 980Ti (it's what I had handy at the moment ... yes, it's nice to have stuff like that "handy" :-)

OS Installation

NVIDIA has packaged the DIGITS stack for Ubuntu 14.04. It is very easy to install onto a base OS configuration. The "deb" files have all of the proper dependencies (and there are a lot of them!) The people at NVIDIA who put this together deserve praise for their efforts since this would be a lot of work doing it by hand. For exploring/testing DIGITS I highly recommend you take advantage of this work. 

I have used Ubuntu-MATE 14.04 for this install.

MATE is stable and plays well with the NVIDIA display drivers. The default Unity interface in Ubuntu can be problematic i.e. black screens, artifacting, incomplete startup, install issues etc.. (It is an endless source of headaches for us since we have a large variety of hardware to maintain). MATE is a clean desktop with a traditional GNOME feel and as long as you don't go crazy with software compositing stuff it is very stable and well behaved. It works well with remote desktop clients too i.e. X2go. Lubuntu, Xubuntu and KDE4 are usually trouble free too. In any case, my current recommendation is MATE desktop. 


https://ubuntu-mate.org/   -- this is the main Ubuntu-MATE page but it is focused around Ubuntu 15.x (it is a recent addition to the Ubuntu family of flavours)

https://ubuntu-mate.org/trusty/ -- this is the download page for the 14.04 LTS backport of the MATE desktop for Ubuntu. This is what you want for the DIGITS install.

Install Ubuntu MATE 14.04 LTS

Get the ISO image for "trusty" and install as you normally would. Do an "apt-get update" and "apt-get upgrade". The Ubuntu-MATE 14.04 ISO is built from the ".2" update tree of Ubuntu so there will be a lot of updates. Over 400 packages in my case. Reboot your updated install and season to taste.  [ note: I ran the GUI "Software Updater" after reboot and there was more updates available! ]

Add a few important packages that don't get installed by default

sudo apt-get install build-essential ssh emacs synaptic

Install the "tested" NVIDIA driver

You can open "Control Center" --> "Additional Drivers" and then select the NVIDIA "proprietary tested" driver and "Apply Changes". Reboot into your new NVIDIA powered desktop and open "nvidia-settings" to check that your driver install went as expected. This is a good way to install the NVIDIA display driver's for Ubuntu since this is managed by the packaging system and generally has a fairly up-to-date driver available.

CUDA Install

Go to the CUDA download page and get the Ubuntu 14.04 CUDA repo. If you use the firefox browser for the download you get an option to let the "Ubuntu Software Center" install the repo for you, or you can install the deb package directly.

sudo dpkg -i cuda-repo-ubuntu14.04_7.5-18_amd64.deb

Then install CUDA

sudo apt-get update

sudo apt-get install cuda

Configure your CUDA environment

Add CUDA tools to your path.

Create the file  /etc/profile.d/cuda.sh  add the following line 

export PATH=$PATH:/usr/local/cuda/bin

Add CUDA libraries

Create the file   /etc/ld.so.conf.d/cuda.conf  add the following line


Then run
sudo ldconfig

Now test your CUDA setup

rsync -av /usr/local/cuda/samples .

cd samples

make -j4

That make command should build the sample programs. When it finishes you can cd into bin/x86_64/linux/release/5_Simulations/nbody and run the nbody program as a quick test of your CUDA install.

Install the DIGITS stack

Go to the NVIDIA Developer page for DIGITS. You should read some of the info and register as an NVIDIA developer if you haven't done so previously. [ It is good to register with NVIDIA. You get early access to projects and a nice newsletter and access to the forums. I've never felt that I've been spammed by NVIDIA. They treat their developers with respect. ] When you go to the download page it will ask you to sign in with your developer account and take a short survey. It will ask you to accept a license agreement too. After that you will get the link to the GitHub repo  page "DIGITS v3.0.0 for Ubuntu 14.04 – Repository Access" The GitHub pages have documentation, install and getting started information. You will probably want to read all of that!

You can use the snippets on that GitHub page to download the nvidia machine learning repo or you can go to


and grab the repo install deb file.


You can let the "Ubuntu Software Center" install it or you can download and install it with dpkg.  With the repo installed now it is just

sudo apt-get update

sudo apt-get install digits

You now have DIGITS installed! Yes, it was that easy!

After the install there will be web server running at "localhost" serving the DIGITS web frontend. Open "localhost" with a browser and you will be greeted with DIGITS home. At this point you will probably want to work through the "Getting Started Guide" To get a feel for some of the things you can do from the web interface. That guide walks you through setting up the MNIST digits dataset for training a classifier using the LeNet network model built with Caffe. 

I'll revisit this post soon and add a simple example that you can try using the CIFAR10 data set and the AlexNet model.

Happy computing! --dbk

Tags: Machine Learning, NVIDIA, DIGITS, Ubuntu MATE