0

I want to install tensorflow 2 with gpu support on a freshly installed ubuntu 18.04.

After installing ubuntu18.04 I run the following codes available in tensorflow website.

# Add NVIDIA package repositories here
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.1.243-1_amd64.deb

sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub

sudo dpkg -i cuda-repo-ubuntu1804_10.1.243-1_amd64.deb

sudo apt-get update

wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb

sudo apt install ./nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb

sudo apt-get update

Install NVIDIA driver

sudo apt-get install --no-install-recommends nvidia-driver-450

After rebooting the out put of the command

nvidia-smi
Sun Oct 18 13:35:11 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.80.02    Driver Version: 450.80.02    CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 1060    Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   52C    P0    26W /  N/A |    222MiB /  6078MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=============================================================================| | 0 N/A N/A 1522 G /usr/lib/xorg/Xorg 135MiB | | 0 N/A N/A 1666 G /usr/bin/gnome-shell 78MiB | | 0 N/A N/A 4021 G /usr/lib/firefox/firefox 1MiB | | 0 N/A N/A 4898 G /usr/lib/firefox/firefox 1MiB | | 0 N/A N/A 4959 G /usr/lib/firefox/firefox 1MiB | +-----------------------------------------------------------------------------+

 
dipanjan@msi:~$ sudo apt-get install --no-install-recommends \
>     cuda-10-1 \
>     libcudnn7=7.6.5.32-1+cuda10.1  \
>     libcudnn7-dev=7.6.5.32-1+cuda10.1
[sudo] password for dipanjan: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package cuda-10-1
The error is : Unable to locate package cuda-10-1  
I have tried to solve it by looking online but none of them worked for me.  
Please guide me.
paul
  • 11
  • Did you check out the answers for https://askubuntu.com/questions/767269/how-can-i-install-cudnn-on-ubuntu-16-04 Some still apply to 18.04. – ubfan1 Oct 18 '20 at 15:44
  • Yes , I did install cuda 10.1 from run file. Downloaded cudnn 7.6.5 zip file fron nvidia website and install. But tensorflow is not using GPU. – paul Oct 18 '20 at 20:31
  • Are you sure you got a tensorflow version which supports GPU? CPU only versions are available too. See https://medium.com/@Oysiyl/install-tensorflow-2-with-gpu-support-on-ubuntu-19-10-f502ae85593c and https://github.com/tensorflow/tensorflow/releases/tag/v2.1.0-rc0 – ubfan1 Oct 18 '20 at 21:11

0 Answers0