How to downgrade to cuda 10.0 in arch linux?

2020-08-26 10:47发布

问题:

I want to downgrade my cuda 10.1 to cuda 10.0 in arch linux as tensorflow requires cuda 10.0 only.

I installed tensorflow on CUDA 10.1 in arch Linux but I didn't know tensorflow-gpu needs CUDA 10.0 or lesser.

I tried tried symlinking the required 10.0 libraries with new 10.1 libraries but it didn't work.

Whenever I try to import tensorflow in python console error shows up that 'libcublas.so.10.0' not found.

So I found out that I can only run tensorflow on CUDA 10.0 so now I want to downgrade my CUDA. But I have no Idea how to do that in arch Linux.

Every time I run import tensorflow it gives this error.

Traceback (most recent call last):
  File "/home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/usr/lib/python3.7/imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "/usr/lib/python3.7/imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: /usr/lib/libcublas.so.10.0: version `libcublas.so.10.0' not found (required by /home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/techievin/.local/lib/python3.7/site-packages/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/usr/lib/python3.7/imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
  File "/usr/lib/python3.7/imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: /usr/lib/libcublas.so.10.0: version `libcublas.so.10.0' not found (required by /home/techievin/.local/lib/python3.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)


Failed to load the native TensorFlow runtime.

pacman -S cuda=="10.0" is not working.

I searched everywhere but couldn't find any proper answer for arch Linux to downgrade to CUDA 10.0

回答1:

  1. Download cuda 10.0 package from here: http://archlinux.arkena.net/archive/packages/c/cuda/cuda-10.0.130-2-x86_64.pkg.tar.xz
  2. Install package sudo pacman -U cuda-10.0.130-2-x86_64.pkg.tar.xz


回答2:

I'm facing the same issue and have to re-apply the method I used when I was using my old gtx670:

  1. Downgrade the cuda package
  2. Prevent it from being upgraded

keep in mind that specific Cuda versions need specific nvidia drivers.

Just have a look at the compatibility matrix and eventually prevent also the drivers from upgrading.