Skip to content

Instantly share code, notes, and snippets.

View raulqf's full-sized avatar

raulqf raulqf

View GitHub Profile
raulqf / Install_Multiple_Tensorflow_Cuda_Versions_on_
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 /
Last active November 19, 2021 02:29
Linux Tips

List of Linux Tips

Kill all the process defined by a process name:

ps -aux | grep 'myProcessName' | grep -v grep | awk '{print $2}' | xargs -r kill -9

Check a line from multiple files:

find . -name '' | xargs sed -i 's/..\/\/'
raulqf /
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 /
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:

raulqf /
Last active May 9, 2019 06:09
How to make a dualboot in windows to use a linux distribution.

How to install in windows 10 a linux distribution in dualboot

UEFI mode appearance has made more difficult the dualboot installation of linux in conjunction with windows. This gist is a brief guide to accomplish this goal.

It is assumed that Windows 10 has been installed. First steps before the linux installation is to disable the windows fast start, hibernation mode and hybrid sleep to avoid future problems. Windows fast start must be unchecked from the power options in the control panel under the section 'What power buttons do'. The hibernation must be disabled using a windows command prompt with admin privileges and typing:

*powercfg.exe /h off*

For further information about these configurations visist

raulqf /
Created September 30, 2018 15:14 — forked from benstr/
Gist Markdown Cheatsheet

#Heading 1 ##Heading 2 ###Heading 3 ####Heading 4 #####Heading 5 ######Heading 6


raulqf /
Last active March 11, 2019 00:40
This gist explains how to set an environment to deploy easily your project in your production server.

Configure a working environment to easily Deploy your project using Git

This gist explains how to set a working environment to deploy easily your project in your production server. To this aim a git bare repository is set in the remote server which is used for control versions as well as to upload and deploy your progress to the production server.

The structure of the proposed environment consists of 3 parts:

  1. Working directory (Local)
  2. Deployment directory (Remote Server)
  3. Git bare repository (Remote Server)
raulqf /
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 /
Last active March 29, 2018 13:02
How to Migrate your Drupal site to a new Virtual Machine using Ubuntu

Export the drupal site

  1. Export the database using the export functionality from phpmyadmin. Use the default configuration - Quick, Format SQL. Remember to select the database to export before accessing to this operation. How to install phpmyadmin

  2. Compress the web page code to send to the new virtual machine. You can do it by the following command:

     $ tar -czvf name-of-archive.tar.gz /path/to/directory-or-file

Install Apache in the new machine

The following packages must be installed (remove the comments):

$ sudo apt-get install vim //vim editor

raulqf /
Last active November 3, 2022 04:06
How to install Tensorflow with CUDNN support and how to check the correct installation.

How to install Tensorflow with CUDNN on Ubuntu Distro 14.04 or higher with CUDA 8.0 and CUDNN 6.0

This gist shows how to install Tensorflow with CUDNN support and how to check the correct installation. This gist is based on the Tensorflow installation guide and following the LearnOpencv blog entry Installing Deep Learning Frameworks on Ubuntu with CUDA support that is more complete that this gist but there are sometimes misleading/hidden steps that can be covered in this gist.

First prerequisite is the CUDA Toolkit installation. You can check this gist for the CUDA installation. As a difference from the CUDA installation CUDNN is very easy to install. We only have to deploy the downloaded libraries in your system. At the time I am writing this guide current toolkit version is 8.0.

To downl