KDnuggets Home » News » 2016 » Jun » Tutorials, Overviews » How to Build Your Own Deep Learning Box ( 16:n20 )

How to Build Your Own Deep Learning Box


 
  http likes 229

Want to build an affordable deep learning box and get all the required software installed? Read on for a proper overview.



Install Software

 
Step 1: Install Ubuntu

Ubuntu is the operating system (OS) on which your deep learning box will run, much like Windows or Mac. A straightforward way to install the OS would be to use another computer to download the OS file onto a USB stick. Then, plug the USB stick into your deep learning box and install the OS from there.

Follow the links for instructions on how to download the OS file onto the USB stick from a Windows or Mac. Once you boot Ubuntu on your deep learning box from the USB stick for the first time, you’ll be brought through the installation process.

Step 2: Installing the deep learning stack

deep stack

Nvidia is one of the companies that produces GPUs and they have developed a deep learning framework called Digits. Before we can get Digits running, we have to install a few software up the stack.

We need to install a driver, which acts as an access key for the deep learning software to harness the GPU for its computations. To install it, press Ctrl+Alt+T to open the Terminal window.

linuxTerminal.png

As of Ubuntu 14.04, the Nvidia drivers are part of the official repository. Even though the version maintained in the repository might not be the newest compared to those on the official Nvidia website, they are usually more stable and have been tested by the community against different software. We would recommend using the drivers from the Ubuntu repository.

To search for the latest driver to install:

 $ apt-cache search nvidia


You should be able to find a package that looks like “nvidia-xxx” where xxx is the version number of the driver. Choose the latest one. In this example we would be using nvidia-352.

Then, type in the following commands:

 $ sudo apt-get install nvidia-352 nvidia-352-uvm 
 $ sudo apt-get install nvidia-modprobe nvidia-settings


The additional packages “nvidia-modprobe” and “nvidia-settings” allow easier installations of future packages to Ubuntu.

Step 3: Install CUDA and Digits

CUDA is a platform that enables the GPU to execute tasks in parallel, increasing its efficiency. Digits is the interface for deep learning analysis. You use this interface to upload data, train models and make predictions. To install them, run the following commands:

 $ CUDA_REPO_PKG=cuda-repo-ubuntu1404_7.5-18_amd64.deb &&
    wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/$CUDA_REPO_PKG &&
    sudo dpkg -i $CUDA_REPO_PKG
 $ ML_REPO_PKG=nvidia-machine-learning-repo_4.0-2_amd64.deb && wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1404/x86_64/$ML_REPO_PKG && sudo dpkg -i $ML_REPO_PKG
 $ apt-get update
 $ apt-get install digits


When the installation is successful, fire up your browser and go to http://localhost. You should see a webpage like the one below:

Digits Homepage.png

If you run into errors, refer to the troubleshooting section in the official installation guide

Run Analysis

 
Nvidia Digits is a user-friendly platform that allows you to train prediction models using deep learning techniques. The video below provides a comprehensive demo on the entire process, from uploading data to making predictions:

Conclusion

 
That’s it. You have just built your own deep learning box. If you’re new to deep learning, you can also test the techniques in the cloud first, using Google’s Cloud Machine Learning platform. However, using your own GPU to run analysis might allow you more speed and flexibility to tweak parameters in the long-run.

Bio: Hui Han Chin graduated from Carnegie Mellon University School of Computer Science. Currently he is a systems engineer at the DSO national laboratories, Singapore.

Original. Reposted with permission.

For more posts like this, visit: https://annalyzin.wordpress.com.

Related:


Sign Up

By subscribing you accept KDnuggets Privacy Policy