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 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
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:
We can now install the required runtime library.
Sudo dpkg –I libcudnn7_220.127.116.11-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_18.104.22.168-1+cuda9.0_amd64.deb
Install code samples and documents such as user guides with the command below.
Sudo dpkg –I libcudnn7-doc_22.214.171.124-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.