2

So, I am trying to install Cuda on Debian 10.3 on SageMaker studio instance ml.g4dn.xlarge.

I am trying the instructions from here:

https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Debian&target_version=10&target_type=deblocal

So, I tried on Debian Machine:

  dpkg -i cuda-repo-debian10-11-1-local_11.1.0-455.23.05-1_amd64.deb
  apt-get install gnupg
  apt-key add /var/cuda-repo-debian10-11-1-local/7fa2af80.pub
  apt-get install software-properties-common
  add-apt-repository contrib
  apt-get update
  apt-get -y install cuda

But, in the end, I get:

 /tmp/apt-dpkg-install-y7M08M/097-nvidia-persistenced_455.23.05-1_amd64.deb
  E: Sub-process /usr/bin/dpkg returned an error code (1)

Does any one have any clue, what is going on here?

enter image description here

More logs on error:

    dpkg: error processing archive /tmp/apt-dpkg-install-nkwkn4/097-nvidia-persistenced_455.23.05-1_amd64.deb (--unpack):
     unable to make backup link of './usr/bin/nvidia-persistenced' before installing new version: Invalid cross-device link
    Selecting previously unselected package libxnvctrl0:amd64.
    Preparing to unpack .../098-libxnvctrl0_455.23.05-1_amd64.deb ...
    Unpacking libxnvctrl0:amd64 (455.23.05-1) ...
    Selecting previously unselected package libgdk-pixbuf2.0-common.
    Preparing to unpack .../099-libgdk-pixbuf2.0-common_2.38.1+dfsg-1_all.deb ...
    Unpacking libgdk-pixbuf2.0-common (2.38.1+dfsg-1) ...
    Selecting previously unselected package libgdk-pixbuf2.0-0:amd64.
    Preparing to unpack .../100-libgdk-pixbuf2.0-0_2.38.1+dfsg-1_amd64.deb ...
    Unpacking libgdk-pixbuf2.0-0:amd64 (2.38.1+dfsg-1) ...
    Selecting previously unselected package gtk-update-icon-cache.
    Preparing to unpack .../101-gtk-update-icon-cache_3.24.5-1_amd64.deb ...
    No diversion 'diversion of /usr/sbin/update-icon-caches to /usr/sbin/update-icon-caches.gtk2 by libgtk-3-bin', none removed.
    No diversion 'diversion of /usr/share/man/man8/update-icon-caches.8.gz to /usr/share/man/man8/update-icon-caches.gtk2.8.gz by libgtk-3-bin', none removed.
6
  • The actual error was likely further up in the output.
    – jordanm
    Commented Oct 13, 2020 at 17:12
  • @jordanm Ok, I try again and pasted the whole log again. Hope that helps.
    – learner
    Commented Oct 13, 2020 at 17:20
  • askubuntu.com/questions/1252188/… The above should point you in the right direction.
    – Ben
    Commented Oct 19, 2020 at 15:01
  • @Ben, that solution does not work for me. Thanks.
    – learner
    Commented Oct 20, 2020 at 12:44
  • not all instances are gpu powered. aws.amazon.com/nvidia
    – Michael D.
    Commented Oct 30, 2020 at 0:51

1 Answer 1

4

I installed CUDA 11.1 on Debian 10 (Buster) following instructions found on nVidia's website:

sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/debian10/x86_64/7fa2af80.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/debian10/x86_64/ /"
sudo add-apt-repository contrib
sudo apt-get update
sudo apt-get -y install cuda

This took a long time to run, but when it finished I was able to compile and run some of the sample code. nVidia's CUDA installation guide for linux was helpful.

I had to move the developer.download.nvidia.com repo to the top of /etc/apt/sources.list, ahead of testing and buster-backports, which I added in previous attempts to get CUDA working, to eliminate unmet dependency errors.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .