在Ubuntu上安装CUDA + RAPIDS-“没有可用的内核映像”

时间:2019-09-01 01:43:21

标签: python cuda gpu rapids

编辑:在下面的评论中解决。

我正在尝试使用CUDA + RAPIDS。为此,我使用Ubuntu 18.04和NVIDIA Tesla K80在Google Compute上启动了VM。这是我为了安装软件而运行的命令:

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget http://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1804-10-1-local-10.1.243-418.87.00_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-10-1-local-10.1.243-418.87.00/7fa2af80.pub
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install cuda gcc
sudo apt-get -y autoremove

wget https://repo.anaconda.com/archive/Anaconda3-2019.07-Linux-x86_64.sh
bash Anaconda3-2019.07-Linux-x86_64.sh 
source ~/.bashrc

conda update -n base -c defaults conda

conda create --name test3.7 python=3.7
conda activate test3.7

conda install -c rapidsai -c nvidia -c numba -c conda-forge -c anaconda \
    cudf=0.9 cuml=0.9 cugraph=0.9 python=3.7 anaconda::cudatoolkit=10.0

conda install -c anaconda -c conda-forge -c plotly scipy chardet numpy pandas scikit-learn matplotlib plotly chart-studio

sudo shutdown -r now

然后我尝试使用cudf而不是熊猫运行一小段Python,然后出现以下错误:

terminate called after throwing an instance of 'thrust::system::system_error'
  what(): parallel_for failed: no kernel image is available for execution on the device
Aborted (core dumped)

我不确定缺少什么,因为我已经阅读了无数指南,它们都说:“您只需要运行这些少数命令,就可以了!”使用列出的相同命令。最近,我发现我应该使用nvcc从源代码编译CUDA驱动程序,但是我在任何地方都找不到指南来显示要使用的命令(每个人都指向数百页长的PDF)而不是实际提供有用的命令)。那么,我还需要做些什么来使CUDA + RAPIDS使用Tesla K80在Ubuntu 18.04系统上运行?

谢谢!

1 个答案:

答案 0 :(得分:1)

如果您安装了RAPIDS的二进制版本(例如,通过pip或conda),则这些软件包将期望GPU当前具有6.0或更高版本的计算能力,如here所示。当然,将来可能会改变。

在某种程度上,这取决于这些二进制文件的RAPIDS代码编译方式(这也可能意味着RAPIDS使用的功能在早期GPU中可能不可用)。您可以通过从源代码构建RAPIDS来更改此设置,但是通常有充分的理由以这种方式编译代码-通常意味着它们使用“较旧” GPU中不可用的“较新” CUDA功能。

因此,解决此问题的最简单方法可能是从具有Tesla K80的计算机切换到具有Tesla P100或更新GPU的计算机。

相关问题