First of all install update and upgrade your system:
$ sudo apt update
$ sudo apt upgrade
Then, install required libraries:
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
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
One of the best option is to use the run package offered by Qt to install the libraries and its IDE (Qt Creator). Nevertheless However, when you want to compile it for a sever, where no GUI is required, you must be then interested in how to compile from source and discover some of the configuration options you have to disable some GUI modules among others and get lightest weight libraries.
First of all download the tar.xz file from Qt. You can also go to the archive and select the best that fulfill your requirement. Right now I am going on with the newest version up to the moment v5.9.3.
Create a directory and uncompress the downloaded file:
$ mkdir temp
$ cd temp
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
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/
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: