×
Community Blog How to Prepare Your GPU Machine and Get It cuDNN Ready

How to Prepare Your GPU Machine and Get It cuDNN Ready

This brief tutorial shows you the step-by-step installation process for preparing cuDNN on an Alibaba Cloud GPU instance.

By Henry Lee, Solutions Architect

Video and image processing solutions are some of the hottest topics of today. They play a crucial role in making artificial intelligence a reality, such as in AR/VR and unmanned vehicle (driverless) technologies. There are number of packaged solutions in the market for video and image processing, and most of them depend on GPU technology to run.

However, there are always questions about the preparation of GPU system for video or image processing. Although we can easily get prebuilt images on a software marketplace, but many packaged solutions have their own prerequisites. Depending on your application, manual installation for specific versions may be preferred over packaged solutions.

This article captures the step-by-step installation process for the preparation of cuDNN on Alibaba Cloud GPU compute service. cuDNN is part of the NVIDIA deep learning SDK includes standard routines such as pooling, normalization and convolution.

To prepare the deep learning platform, we start with setting up the GPU compute service. We can deploy any GN5 series machine; in this demo, we will be using an X86_64 Linux platform machine. We install setup both cuDNN and CUDA drivers (requirement for cuDNN library) and follow up with the verification of the cuDNN library.

1

There are two options of package supported; it can be either a package file in tar or deb format. We can download the required directly package from https://developer.nvidia.com/cuda-downloads

We can now install the first package with the following command.

sudo dpkg –i cuda-repo-ubuntu1604_9.1.85-1_amd64.deb

Then you can install the CUDA GPG public key by running the command below.

sudo apt-key adv –fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub

2

3

Next, we will update the cache with the command below.

sudo apt-get update

You should expect to see the following output.

4

The CUDA is ready and we can verify the driver with the deviceQuery command.

/usr/local/cuda/extras/demo_suite/deviceQuery 

You should expect the following output.

5

6

Now we can start the cuDNN setup. First you'll need to get the cuDNN package, which includes the following files:

1.    Libcudnn7-dev_7.1.3.16-1+cuda9.0-amd64.deb
2.    Libcudnn7-doc_7.1.3.16-1+cuda9.0_amd64.deb
3.    Libcudnn7_7.1.3.16-1+cuda9.0_am64.deb

7

We can now install the required runtime library.

Sudo dpkg –I libcudnn7_7.1.3.16-1+cuda9.0_amd64.deb

8

Next, you need to update the apt cache.

sudo apt-get update

9

Next, install the developer library.

Sudo dpkg –I libcudnn7-dev_7.1.3.16-1+cuda9.0_amd64.deb

10

Install code samples and documents such as user guides with the command below.

Sudo dpkg –I libcudnn7-doc_7.0.3.11-1+cuda9.0_amd65.deb

11

Your cuDNN driver is ready to go. We can verify the setup with mninstCUDNN*. If everything is set up correctly, you should expect the following result.

12

Now your GPU system is ready for deep learning! Get started now on Alibaba Cloud's GPU platform for a flexible and cost effective way to run machine learning and deep learning projects.

0 0 0
Share on

Alibaba Clouder

2,605 posts | 747 followers

You may also like

Comments

Alibaba Clouder

2,605 posts | 747 followers

Related Products

  • Deploy NVIDIA on Alibaba Cloud

    Fueled by the insatiable demand for better 3D graphics, and the massive scale of the gaming market, NVIDIA has evolved the GPU into a computer brain at the exciting intersection of virtual reality, high performance computing, and artificial intelligence.

    Learn More
  • Platform For AI

    A platform that provides enterprise-level data modeling services based on machine learning algorithms to quickly meet your needs for data-driven operations.

    Learn More
  • Marketplace

    Marketplace is an online market for users to search and quickly use the software as image for Alibaba Cloud products.

    Learn More