How to install CUDA in Google Colab GPU's

前端 未结 7 1674
悲哀的现实
悲哀的现实 2020-12-05 13:31

It seems that Google Colab GPU\'s doesn\'t come with CUDA Toolkit, how can I install CUDA in Google Colab GPU\'s. I am getting this error in installing mxnet in Google Cola

7条回答
  •  半阙折子戏
    2020-12-05 13:56

    1. Go here: https://developer.nvidia.com/cuda-downloads
    2. Select Linux -> x86_64 -> Ubuntu -> 16.04 -> deb (local)
    3. Copy link from the download button.
    4. Now you have to compose the sequence of commands. First one will be the call to wget that will download CUDA installer from the link you saved on step 3
    5. There will be installation instruction under "Base installer" section. Copy them as well, but remove sudo from all the lines.
    6. Preface each line with commands with !, insert into a cell and run
    7. For me the command sequence was the following:
      !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
    8. Now finally install mxnet. As cuda version I installed above is 9.2 I had to slighly change your command: !pip install mxnet-cu92
    9. Successfully installed graphviz-0.8.3 mxnet-cu92-1.2.0

提交回复
热议问题