How to Prepare Your GPU Machine and Get It cuDNN Ready

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.

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

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

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

sudo apt-get update

You should expect to see the following output.

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


You should expect the following output.

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

We can now install the required runtime library.

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

Next, you need to update the apt cache.

sudo apt-get update

Next, install the developer library.

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

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

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.

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.


Follow me to keep abreast with the latest technology news, industry insights, and developer trends.