How to install Cudnn from command line [closed]
Asked Answered
H

7

22

Cudnn: https://developer.nvidia.com/cudnn

I login and go jump through all the hoops that NVIDIA wants you to do; however, when it comes time to download the file I can't seem to figure out how to do it via wget and the command line.

I was hoping someone has done this. I've copy and pasted the link that they want to click and used this in wget copy-and-pasted-url. But I just get back an html file.

Hydantoin answered 7/7, 2015 at 21:21 Comment(0)
D
23

The following trick works with Firefox:

  1. Download the file with your regular machine
  2. Go to the downloads list in firefox, right click on the file and click "Copy original download URL"

enter image description here

  1. Go to your pure-terminal machine, and type:

    wget PASTE-YOUR-LINK-FROM-FIREFOX

As @deltheil mentionned, by doing this the link contains a temporary download token, letting you download the file from another machine then the one it was requested from

EDIT

The downloaded filename is libcudnn***.deb?<some download token>. You will need to rename it by stripping the ? and everything after it:

mv libcudnn***.deb?xxx libcudnn***.deb
Distrustful answered 10/4, 2018 at 11:17 Comment(1)
Or, download and rename altogether: wget download_link -O desired_name.Qoph
G
10
CUDNN_TAR_FILE="cudnn-8.0-linux-x64-v6.0.tgz"
wget http://developer.download.nvidia.com/compute/redist/cudnn/v6.0/${CUDNN_TAR_FILE}
tar -xzvf ${CUDNN_TAR_FILE}
sudo cp -P cuda/include/cudnn.h /usr/local/cuda-8.0/include
sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda-8.0/lib64/
sudo chmod a+r /usr/local/cuda-8.0/lib64/libcudnn*
Goy answered 12/11, 2017 at 5:54 Comment(1)
The URL might look like developer.download.nvidia.com/compute/redist/cudnn/v8.7.0/… nowadaysReconnoiter
U
6

The download link that you get right after the accept terms section is authenticated (the GET request gives you a HTTP 302 Moved Temporarily).

If you really want to grab the link from the command line: open your browser, use the developers tools and look at the Location field after the redirection: you can use this link directly with wget as it contains a short-lived authorization token.

Unhand answered 8/7, 2015 at 8:18 Comment(0)
G
2

You may try the following:

curl -O http://developer.download.nvidia.com/compute/redist/cudnn/v2/cudnn-6.5-linux-x64-v2.tgz

This will download CUDNN 6.5

Gotthelf answered 4/2, 2016 at 17:23 Comment(0)
H
1

The location for the latest one is in the NVIDIA latest Docker file, currently at:

https://github.com/NVIDIA/nvidia-docker/tree/master/centos-7/cuda/7.5/runtime/cudnn5

Hills answered 28/5, 2016 at 4:21 Comment(1)
Dead link as of now.Shinn
M
0

I tried all of these answers and none worked unfortunately.

Though a simple workaround is: apt-get update && apt-get install -y --no-install-recommends <cuDNN Package>

For example, in my case it is:

apt-get update && apt-get install -y --no-install-recommends libcudnn8

And it works!

Maw answered 6/1, 2022 at 20:11 Comment(1)
I tried the following: sudo apt-get update && apt-get install -y --no-install-recommends libcudnn8-8.1.1.33-1.cuda11.2.x86_64 and got the error: ` GPG error: developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/… InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC`Seigel
I
0

Click on the version of cudnn you want to install from Index of /compute/redist/cudnn/ and follow it. When you reach the page shown in the image below, right-click to get the url for wget.

enter image description here

You just wget cudnn from that link and install it. The commands below assume you are using Ubuntu.

wget https://developer.download.nvidia.com/compute/redist/cudnn/v8.8.0/local_installers/11.8/cudnn-local-repo-ubuntu2204-8.8.0.121_1.0-1_arm64.deb
sudo apt install cudnn-local-repo-ubuntu2204-8.8.0.121_1.0-1_arm64.deb
Imitation answered 29/7, 2023 at 3:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.