Skip to content

Instantly share code, notes, and snippets.

View raulqf's full-sized avatar

raulqf raulqf

View GitHub Profile
@raulqf
raulqf / nvidia_drivers.md
Last active January 11, 2023 22:38
Install Nvidia Drivers - Ubuntu

How to install NVIDIA Drivers

Disable nouveau (if required) - free and open source graphi device driver for Nvidia video cards.

First disable nouveau free/libre software drivers for NVIDIA using blacklist:

$ sudo vim /etc/modprobe.d/blacklist.conf

And include:

blacklist nouveau

@raulqf
raulqf / Install_Multiple_Tensorflow_Cuda_Versions_on_ the_Same_Machines.md
Last active February 27, 2023 20:21
How to install multiple Tensorflow - CUDA versions on the same machine

How to install multiple Tensorflow - CUDA versions on the same machine

As Tensorflow is continuously evolving, it is normal to find a situation in which you require multiple versions of Tensorflow to coexist on the same machine. Those versions can be different enough to have different CUDA library dependencies. In this case, you can be tempted to upgrade to the latest release but maybe some of your solutions are still in production or just there are not more holes in your calendar.

In this gist I will cover how to install several CUDA libraries to support different tensorflow verions. However, there are some red lines that you have to respect as the GCC versions, that must be the same, and the nvidia drivers that must support the target CUDA versions. You can check that information in the Tensoroflow website.

The basic idea is to install the CUDA libraries and abuse of the linux system to find the correct libraries when executing the target tensorflow version

@raulqf
raulqf / Install_Tensforflow2_with_GPU_in_Ubuntu20.04.md
Last active July 28, 2023 07:14
How to install Tensorflow2 with GPU support in Ubuntu 20.04

How to install Tensorflow2 with GPU support in Ubuntu 20.04

Installation of Tensorflow2 with GPU support is easy and the only complication can be arisen from the CUDA compability which in turns depends on the Nvidia driver version. Before going farther, please check if your Nvidia Video Card is compatible with the required versions that are defined in this gist, use this link.

Tensorflow offers in its website a table of the compatibility between libraries for the target OS. You can visit that website in the following COMPATIBILITY TABLE that points to the Tensorflow installation from source for linux. For the time writing this gist, Tensorflow2 v2.5.0 requires CUDA v11.2 and CUDNN v8.2. It is really important to match the exact version, otherwise tensorflow will have problems loading the shared libraries as not finding the correct version.

CUDA version also requires for a minimum Nvidia driver version

@raulqf
raulqf / Install_OpenCV3_CUDA9.md
Last active September 2, 2023 13:13
Install OpenCV 3.4.1 with CUDA 9.0 support for an Ubuntu 18.04 distro.

How to install OpenCV 3.4.1 with CUDA on Ubuntu distro

First of all install update and upgrade your system:

    $ sudo apt-get update
    $ sudo apt-get upgrade

Then, install required libraries:

@raulqf
raulqf / Install_OpenCV4_CUDA11_CUDNN8.md
Last active May 9, 2024 16:51
How to install OpenCV 4.5 with CUDA 11.2 in Ubuntu 22.04

How to install OpenCV 4.5.2 with CUDA 11.2 and CUDNN 8.2 in Ubuntu 22.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries: