似乎Google Colab GPU没有CUDA工具包,我如何在Google Colab GPU中安装CUDA。我在Google Colab中安装mxnet时遇到了这个错误。
Installing collected packages: mxnet
Successfully installed mxnet-1.2.0
ERROR: Incomplete installation for leveraging GPUs for computations. Please make sure you have CUDA installed and run the following line in your terminal and try again:
pip uninstall -y mxnet && pip install mxnet-cu90==1.1.0
Adjust 'cu90' depending on your CUDA version ('cu75' and 'cu80' are also available). You can also disable GPU usage altogether by invoking turicreate.config.set_num_gpus(0). An exception has occurred, use %tb to see the full traceback.
SystemExit: 1
如果您切换到使用GPU,那么CUDA将在您的VM上可用。基本上,您需要做的是匹配MXNet的版本和已安装的CUDA版本。
以下是我在Colab上安装MXNet时使用的方法:
首先检查CUDA版本
对我来说它输出了
#define TF_CUDA_VERSION "8.0"
然后我安装了MXNet
sudo
。!
在每一行前面插入命令,插入单元格并运行!wget https://developer.nvidia.com/compute/cuda/9.2/Prod/local_installers/cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64 -O cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64.deb !dpkg -i cuda-repo-ubuntu1604-9-2-local_9.2.88-1_amd64.deb !apt-key add /var/cuda-repo-9-2-local/7fa2af80.pub !apt-get update !apt-get install cuda
!pip install mxnet-cu92
Successfully installed graphviz-0.8.3 mxnet-cu92-1.2.0
我非常相信Google Colab已经预装了Cuda。。。您可以打开一个新的笔记本并键入
!nvcc --version
,这将返回已安装的Cuda版本。这是我的:
相关问题 更多 >
编程相关推荐