Cuda 10.0 installation, installs 10.1


I am trying to install Cuda 10.0 on a new machine (ubuntu 18.04, RTX 2070), following those steps:

sudo apt-get purge nvidia*
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /usr/local/cuda*
sudo apt-key adv --fetch-keys
echo "deb /" | sudo tee /etc/apt/sources.list.d/cuda.list
sudo apt-get update 
sudo apt-get -o Dpkg::Options::="--force-overwrite" install cuda-10-0 cuda-drivers
echo 'export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}' >> ~/.bashrc



| NVIDIA-SMI 418.56 Driver Version: 418.56 CUDA Version: 10.1 |
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| 0 GeForce RTX 2070 Off | 00000000:02:00.0 On | N/A |
| 0% 40C P8 14W / 175W | 334MiB / 7949MiB | 1% Default |

| Processes: GPU Memory |
| GPU PID Type Process name Usage |
| 0 1693 G /usr/lib/xorg/Xorg 198MiB |
| 0 2397 G /usr/bin/gnome-shell 134MiB |


nvcc -V

nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130

It looks like everything is running as I was able to run the samples well, but when I try to run tensorflow on my GPU, it can’t recognise any GPU on my system (using tensorflow/tensorflow:latest-gpu-py3-jupyter DOCKER image that only requieres NVIDIA Drivers installed)

from tensorflow.python.client import device_lib 


[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
incarnation: 10192142723765318570
, name: "/device:XLA_CPU:0"
device_type: "XLA_CPU"
memory_limit: 17179869184
locality {
incarnation: 8651583191431757218
physical_device_desc: "device: XLA_CPU device"

I never had this problem before and I think something is making conflict with CUDA 10.1 (tensorflow only supports CUDA 10.0)

Is it possible to avoid CUDA 10.1 installation?
418.56 Diver needed for this RTX2070 automatically installs CUDA 10.1
I think the problem that I have with tensorflow comes from here.


You don’t have CUDA 10.1 installed. You have CUDA 10.0 installed. The CUDA 10.1 report from nvidia-smi does not mean what you think it does.

Your problem with tensorflow is due to something else.

Dear all,

Can we have CUDA 10.1 and CUDA 10.0 together in the same machine (ubuntu 18.04)?
I have CUDA 10.1 already installed, when I try to import tensorflow 2 in python 3.6.7, it gives error.

suryadi@xtal:~$ source ./venv/bin/activate 
(venv) suryadi@xtal:~$ python
Python 3.6.7 (default, Oct 22 2018, 11:32:17) 
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
  File "/home/suryadi/venv/lib/python3.6/site-packages/tensorflow/python/", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/suryadi/venv/lib/python3.6/site-packages/tensorflow/python/", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/suryadi/venv/lib/python3.6/site-packages/tensorflow/python/", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/home/suryadi/venv/lib/python3.6/", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/home/suryadi/venv/lib/python3.6/", line 343, in load_dynamic
    return _load(spec)
ImportError: cannot open shared object file: No such file or directory

How to install CUDA 10.0 along with CUDA 10.1?
How to set correct environment variables?

Thank you very much in advance.

warmest regards,

the instructions are in the linux install guide

if you installed using a runfile installer, its trivially simple, just install CUDA 10.0 runfile installer. You can have it modify the symbolic link for you or not as you wish. Answer “no” when prompted to install the driver (the cuda 10.1 driver will work with CUDA 10.0)

The instructions to setup environment variables correctly are also in the linux install guide.

If you used package manager install, then instead of installing “cuda”, install “cuda-toolkit-10-0”

Dear Robert,

I do manage to install CUDA 10.0 alongwith CUDA 10.1. NVCC works with CUDA 10.0 and tensorflow 1.13.1 now can be called inside python 3.6.7.
Thank you very much.

Warmest Regards,