Skip to content

Instantly share code, notes, and snippets.

View raulqf's full-sized avatar

raulqf raulqf

View GitHub Profile
@raulqf
raulqf / Install_Multiple_Tensorflow_Cuda_Versions_on_ the_Same_Machines.md
Last active August 1, 2024 07: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 / Linux_Tips.md
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 'process.sh' | xargs sed -i 's/..\/load_env.sh/modules\/load_env.sh/g'
@raulqf
raulqf / Install Tensorflow2 with GPU - Ubuntu 24.04.md
Last active September 19, 2024 17:44
Install Tensorflow2 with GPU - Ubuntu 24.04

Install Tensorflow2 with GPU in Ubuntu 24.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.17.0 requires CUDA v12.3 and CUDNN v8.9. As CUDA v12.6 gives support for Ubuntu 24.04, I've replaced CUDA v12.3 with CUDA v12.6, but maintaining CUDNN v8.9. It is really important to match the exact version of CUDNN, otherwise tensorflow will have proble

@raulqf
raulqf / Install_OpenCV4_CUDA12.6_CUDNN8.9.md
Last active November 6, 2024 10:52
How to install OpenCV 4.10 with CUDA 12 in Ubuntu 24.04

Install OpenCV 4.10 with CUDA 12.6 and CUDNN 8.9 in Ubuntu 24.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries:

@raulqf
raulqf / dualboot.md
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 https://www.pugetsystems.com/labs/support-software/How-to-disable-Sleep-Mode-or-Hibernation-793/

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

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


Paragraph

@raulqf
raulqf / git_environment_for_deployment.md
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
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 / apache_drupal.md
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
raulqf / Install_Tensorflow_with_CUDNN.md
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