Luca Massaron
Luca Massaron

Reputation: 1809

Installing tf-nightly-gpu-2.0-preview on Google Colab

I would like to test the new TensorFlow 2.0 preview on Colab with GPU support but, after installing TensorFlow using !pip install tf-nightly-gpu-2.0-preview on a cell, when I import the package I get the error: ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory which points to some misalignment with the pre-installed CUDA version on the platform.

Upvotes: 1

Views: 4867

Answers (2)

Karan Rajbhar
Karan Rajbhar

Reputation: 21

Change Noteboot Setting to use Hardware accelerator set on GPU after that run

!pip install tf-nightly
import tensorflow as tf
print(tf.__version__)

Upvotes: 1

Luca Massaron
Luca Massaron

Reputation: 1809

The solution is to re-install CUDA 10.0 on Colab by the following instructions:

!wget https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64 -O cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64.deb
!dpkg -i cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64.deb
!apt-key add /var/cuda-repo-10-0-local-10.0.130-410.48/7fa2af80.pub
!apt-get update
!apt-get install cuda
!pip install tf-nightly-gpu-2.0-preview

After executing the previous commands in a cell, you can import and test the TensorFlow 2.0 preview with GPU support:

import tensorflow as tf
print(tf.__version__)

Upvotes: 8

Related Questions