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.
Asked
Active
Viewed 4,714 times
1

Luca Massaron
- 1,734
- 18
- 25
2 Answers
8
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__)

Luca Massaron
- 1,734
- 18
- 25
1
Change Noteboot Setting to use Hardware accelerator set on GPU after that run
!pip install tf-nightly
import tensorflow as tf
print(tf.__version__)

Karan Rajbhar
- 21
- 4