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

陌路散爱 提交于 2019-12-08 09:10:28

问题


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.


回答1:


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__)


来源:https://stackoverflow.com/questions/54223282/installing-tf-nightly-gpu-2-0-preview-on-google-colab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!