How to install cuda on Jetson AGX Xavier? - nvidia-jetson

We have a Nvidia Jetson NGX and our cuda installation broke after working for a while after accidentally updating "sudo apt update".
We were not sure how to install cuda onto the jetson without reflashing it.

Related

Tensorflow for GPU without Conda not working

I wanted to use tensorflow for GPU for my current project so I followed a tutorial from youtube to install it without using conda (https://www.youtube.com/watch?v=-Q6SM_usn84)
I followed the tutorial and turns out there is no CUDA 11.2 for windows 11. Hence I installed the latest version i.e. CUDA 12 and followed the rest of the tutorial.
I then proceeded to create a virtualenv using python 3.10.10 and installed tensorflow using:
pip3 install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.11.0-cp310-cp310-win_amd64.whl
It did install successfully and imports but does not list my GPU as a physical device available.
After a bit of research I came across this "https://forums.developer.nvidia.com/t/how-do-i-install-cuda-11-0-on-windows-11-not-wsl2-windows-itself/192251" and reinstalled CUDA 11.2 for windows 10 in my windows 11 machine. Everything is still the same.
It imports but does not list my GPU as a physical device available.

Tensorflow + Pytorch install Cudatoolkit 11.2

I have a Windows 10 machine with an nvidia 3080 card. 11.2 with CudaToolkit
I want to install a Pytorch in addition to TensorFlow, which works 100% fine so far.
If I understand the description correctly, the CudaToolkit installed without the Cuda Python env is “independent” of the Cuda toolkit version installed for Windows.
I tried to install Pytorch with this command, but it does not want to recognize the GPU.
pip install torch==1.9.0+cu102 torchvision==0.10.0+cu102 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

I already have a CUDA toolkit installed, why is conda installing CUDA again?

I have installed cuda version 11.2 and CUDNN version 8.1 in ubuntu
cnvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Nov_30_19:08:53_PST_2020
Cuda compilation tools, release 11.2, V11.2.67
Build cuda_11.2.r11.2/compiler.29373293_0
When I installed tensorflow-gpu in conda environment, it is again installing cuda and cudnn.
Why is it happening.
How to stop conda from installing cuda and cudnn again?
Can I just use cuda and cudnn that I have already installed? If yes, how?
Why is it happening?
Conda expects to manage any packages you install and all their dependencies. The intention is that you literally never have to install anything else by hand for any packages they distribute in their own channel. If a GPU accelerated package requires a CUDA runtime, conda will try to select and install a correctly versioned CUDA runtime for the version of the Python package it has selected for installation.
How to stop conda from installing cuda and cudnn again?
You probably can't, or at least can't without winding up with a non-functional Tensorflow installation. But see here -- what conda installs is only the necessary, correctly versioned CUDA runtime components to make their GPU accelerated packages work. All they don't/can't install is a GPU driver for the hardware.
Can I just use cuda and cudnn that I have already installed?
You say you installed CUDA 11.2. If you look at the conda output, you can see that it wants to install a CUDA 10.2 runtime. As you are now fully aware, versioning is critical to Tensorflow and a Tensorflow build requiring CUDA 10.2 won't work with CUDA 11.2. So even if you were to stop conda from performing the dependency installation, there is a version mismatch so it wouldn't work.
If yes, how?
See above.

What is the proper configuration for Quadro RTX3000 to run tensorflow with GPU?

My laptop System is Win10, with GPU NVIDIA Quadro RTX3000.
While trying to set up the TensorFlow with GPU, it always can't recognize my GPU.
What is the proper configuration for CUDA/CUDNN/Tensorflow etc.?
I did suffer a while before making it works.
Here is my configuration:
Win10
RTX 3000
Nvidia driver version 456.71
cuda_11.0.3_451.82_win10 (can't works with 11.1 version, not sure why)
cudnn -v8.0.4.30
Python 3.8.7
Tensorflow 2.5.0-dev20210106 (2.4 don't support cuda 11.x)
For future reference, You could have simply installed Anaconda on windows and run the command conda install -c anaconda tensorflow-gpu which would install the required CUDA, Tensorflow, CUDNN (correct versions) while forming a separate environment to effortlessly install Tensorflow.
It's the easiest solution, one that works out-of-the box and automates all the tasks.

is there a way to use tensorflow on windows 10 without slowing it down with a virtual machine?

I am using tensorflow currently on a virtualbox Linux VM, on a native windows pc.
This is slow.
I've read what I could find about this (e.g.: How to install TensorFlow on Windows?)
However, they suggest using a Virtual Machine, which is maybe 10 times slower compared to a native OS.
Is there a way to use Tensorflow just in windows directly?
Yes. We recently announced TensorFlow 0.12, which is the first version that comes with Windows support and pre-built packages for Windows. It supports Python 3.5 and GPU acceleration with GPUs that support CUDA 8.0. To install the Python package on Windows you can use pip:
C:\> pip install tensorflow
To install the GPU-acclerated version there is a different package:
C:\> pip install tensorflow-gpu