PyTorch with GPU Support Ubuntu - pytorch

I know this has been covered many times here, but I am still struggling to download PyTorch with NVIDIA GPU support on my end. I am using a Windows 10 OS but am trying to download Torch through an Ubuntu terminal because one of my project codes has a conflict with Windows.
I am running Python 3.9.12 and have a NVIDIA RTX 3090. I can provide other details about the hardware if needed.
I have followed this guide: Jeff Heaton: PyTorch with GPU support and tried to follow PyTorch's own guidelines and failed. I have then tried them again after deleting previous NVIDIA drivers and CUDA versions via
sudo apt-get remove --purge nvidia\*
sudo apt-get remove --purge \*cuda\*
but failed again.
Many times, I encountered the following error when using
nvidia-smi
Thank you all for your time and please let me know what I could do.

Related

How to install CUDA 11.2 and cuDNN 8.1 on WSL2 for TensorFLow 2?

I am very much struggling to get NVIDIA's CUDA 11.2 and cuDNN 8.1 for TensorFlow 2 on my WSL2 machine.
I have followed their guide to install the latest CUDA 11.8 version and it works. The guide can be found here and is the standard guide recommended by NVIDIA.
Though, TF2 only supports certain CUDA/cuDNN combinations as shown here
Further, I have found the index of previously available WSL2 releases of CUDA and 11.2.0-1 is listed! You can see it for yourself here
Can anybody give me the commands to get CUDA 11.2 and cuDNN 8.1 on my WSL2 machine so that I can finally get back to coding in TensorFlow 2? I am thinking about something like this :
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda-repo-wsl-ubuntu-11-8-local_11.8.0-1_amd64.deb
sudo dpkg -i cuda-repo-wsl-ubuntu-11-8-local_11.8.0-1_amd64.deb
sudo cp /var/cuda-repo-wsl-ubuntu-11-8-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda
My specs :
OS : Windows 10 (WSL2 compatible 22H2 release, the latest one)
Processor : AMD Ryzen 7 5800H
RAM : 32GB
GPU : NVIDIA GeForce RTX 3070 Laptop GPU
WSL2 Distro : Ubuntu 20.04.5 LTS
I just read your question please follow.
Do you installed compatible Cuda versions with your target GPU device? Example: I use CuDa 11.6 and for the NVIDIA GeForce RTX 3070 Laptop GPU, 5120 compatible since 8.6, read from CuDA Nvidia GPU developer
Install Tensorflow then Tensorflow GPU, if it still does not recover your GPU you need to build it on your machine that is not a complex task but finding one existing on websites is a more convenient way Test build configuration
If you try to build it on Linux you need to install a compatibility version of Cuda and CuDNN Compatibility Matrix
Last I read this question multiple of times, you still can download target versions of CuDA archived CuDA and CuDNN archive link
That is because they question then screenshot added see TF2.11 and WSL2.0 related to my answers

OpenVino can't install on ubuntu 22.04

can any one help me to install OpenVino in Ubuntu 22.04 LTS each time I try to install, it giving me errors (E: Unable to locate package openvino) . I tried to installing it with Exp1: sudo apt install openvino
Exp2: sudo apt install openvino-..
The latest OpenVINO™ 2022.1 release only supports Ubuntu 18.04 long-term support (LTS),64 bit and Ubuntu 20.04 long-term support (LTS), 64-bit.
Refer to the Release Notes for new features enablement and supportabilities.
Would your use-case allow to use OpenVINO in a Docker container? Then you could use one of the pre-built OpenVINO Docker container images.
Have a look here: https://docs.openvino.ai/latest/openvino_docs_install_guides_installing_openvino_docker_linux.html

Upgrading GLX to version 1.3 on Ubuntu 18.04

I have the following question: for the purpose of visualisation of some point clouds with GLFW library and Open3D, I would like to upgrade GLX to version 1.3 on Ubuntu 18.04. Having done some research on the Internet, I applied the most commonly advised solution:
sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get upgrade
but to no avail - glxinfo | grep version still yields 1.2. Could it be driver-related? My graphics card is GeForce RTX 2070 and my driver is 460.32.03. I also seem to have the newest version of the Mesa library.
I am running out of ideas and will greatly appreciate any help!
Try to put
java -Dprism.order=sw -jar yourjar.jar
While executing it.

Trying to install Linux kernel headers but getting an error

I am trying to follow the NVIDIA Driver Installation Quickstart Guide:
https://docs.nvidia.com/datacenter/tesla/tesla-installation-notes/index.html
The first instruction says:
The kernel headers and development packages for the currently running
kernel can be installed with:$ sudo apt-get install linux-headers-$(uname -r)
When I try this I get the error:
Unable to locate package linux-headers-4.9.140-tegra
Couldn't find any package by glob 'linux-headers-4.9.140-tegra'
Couldn't find any package by regex 'linux-headers-4.9.140-tegra'
I'm not sure how to proceed.
Your version of Ubuntu is running a tegra kernel. The headers for this kernel are not in the Ubuntu repositories (or any other repositories you may have enabled). You will probably need to these before proceeding with the driver installation.
However. NVIDIA Tegra is a small SoC (system on chip) processor AFAIK. Like a Jetson Nano or something. The instructions you linked are for NVIDIA Tesla GPUs which are data center GPUs. Again, AFAIK. Check you are following the right instructions. Also, in those instructions, look at: 'Section 1.1 - Pre-installation requirements', and this pre install checklist.
Here is a list of all the different kernel headers in the Ubuntu 20.04 repos (not the same I know). tegra is not there.
Before you can install the appropriate kernel headers, update your packages index. First use the update command.
sudo apt-get update
then run sudo apt-get install linux-headers-$(uname -r) again. If this doesn't work, try out
sudo apt-get install linux-headers-generic
which should install the right version.

How does one install Tesseract-OCR 3.03 in Ubuntu/Linux distributions?

A friend and I are interested in training the tesseract-OCR engine for a CV project. We tried using some wrappers such as PyTesser and pyocr, but the results are currently not as accurate as we need them to be. As such, we want to try training the tesseract to perform better for our purposes (i.e. identifying text on food labels), but are having some trouble installing the training tools.
What we've tried:
Looking on the google code website, the 'Compiling' page on the tesseract's google code wiki says the training tools are only available on version 3.03. However, the google code 'Downloads' page for tesseract-ocr only has the materials for 3.02. The bottom of the 'Compiling' page also has some comments about installing version 3.03 on Windows and OSX, but no comments yet for Linux users.
There also appears to be some sort of 3.03 source package for Ubuntu but we're not sure how to access it on our computers and the 'Compiling' page says we need to run these commands:
make training
sudo make training-install
We've also found a google group thread about tesseract 3.03 but again it seems like these posts do not include advice for Linux users (unless we missed something during the initial read).
Is this actually a really simple command-line install problem? Or, is there a way train tesseract with 3.02 (which we currently have installed)? Have we been looking at the wrong places for information?
Any advice or links to instructions for installing tesseract-ocr 3.03 for Linux distributions would be greatly appreciated! Thanks.
Tesseract can directly be installed in Ubuntu 14.04 using
sudo apt-get install tesseract-ocr
I don't have any idea if you can do it in older version of Ubuntu because the repo might be updated in later version of Ubuntu.
I had an aws ubuntu 14.04 instance.
when I tried installing Tesseract with
sudo apt-get install tesseract-ocr
It retuned package not found
But this worked for me.
sudo apt-get update
sudo apt-get install tesseract-ocr
Ubuntu is a debian based Linux distribution. The tesseract package you find will most likely be a debian package which will contain tesseract and the required default language files to allow you to run/train tesseract. You do NOT want the source package -- unless you just want to compile it yourself -- no need. You will not have to build tesseract, you just need to install the package. First, it appears you are new to Ubuntu, so please ready InstallingSoftware. It can be as easy as opening up an x-term and issuing the command apt-get install tesseract-pkgname (note: that means whatever the package name is).
There is no shortcut, take the time to understand whether you have a .deb package on your box that need to be installed or whether you are installing from a remote repository. The link above explains how to handle both.
Here is a specific Ubuntu thread dealing with installing tesseract Tesseract 3.0 + Ubuntu 10.04 Installation Guide Hope that helps. Tesseract is very good software.
I don't have any instructions for building Tesseract 3.03 for Linux specifically (I'm on Mac), but here's a link to download the source code for the 3.03 release candidate: https://tesseract-ocr.googlecode.com/archive/3.03-rc1.tar.gz
First run below command
sudo apt-get install tesseract-ocr
It will install tesseract version 3.04
Run below to update the tesseract
sudo apt-get --only-upgrade install tesseract-ocr
It will update tesseract to 4.1.3

Resources