Simplify Your Cuda / CuDNN Experience Using Docker: An Install Guide for managing Different versions of Cuda/CuDNN on Ubuntu 20.04

Comp Sci User
5 min readJul 31, 2020
Photo by Christian Wiediger on Unsplash

If you have tried to build open source code built with TensorFlow or PyTorch, you have likely encountered the frustrating problem of having to deal with managing which version of the library and the Cuda / CuDNN libraries are installed. You may have even experienced the inability to find the proper version of the library you are interested in on the repositories, having to resort to source code, reverting OSes, or giving up. I am here to tell you that this whole experience is completely unnecessary.

With the use of the NVIDIA Container Toolkit, you can have the ability to instantly launch a container with the proper version of Cuda and CuDNN almost instantly (limited only by your download speed initially), switching back and fourth depending on the version you need.

Getting Started

Installing Docker
To get started, we first need to install Docker. We will be following the instructions from here.

We will run the following:

sudo apt-get updatesudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \…

--

--

Comp Sci User

A graduate student trying to find their way through the chaos…