I’m working via SSH, ideally it would be nice if I could include a script that automatically downloads cuDNN without the need to store the cuDNN installer in our repository.
Tried a few variants of wget with --user, --password, --ask-password, --secure-protocol=auto, no luck so far.
The libraries sourced from developer.nvidia.com like cuDNN are behind an authorization process that cannot be bypassed in this way.
What you can do is run Link Redirect Trace in Chrome and look for the location field:
You should find the file location before the question mark in the path. You can then download from this link on any machine with wget, curl, or my favorite, HTTPie. This should work for basically any download on NVIDIA Developer and is very useful if you need to install to a headless machine.
Hi, here was my solution.
- Like erickson suggested, download the Link Redirect Trace tool from https://chrome.google.com/webstore/detail/link-redirect-trace/nnpljppamoaalgkieeciijbcccohlpoh/related?hl=en.
- Click on the download link from the Nvidia page (e.g. "cuDNN v7.0.5 Library for Linux") but don't download it (for my case, I was downloading to a remote server, and needed to use wget)
- Click on the Link Redirect Trace tooltip in the browser toolbar, and expand to see the details. The "location" param should have the right link, with a valid auth token. You can use wget with this.
Hope this helps!
Thank you! This is really helpful for crafting a Dockerfile!
@bkbolte18 How do you get the redirect link without actually launching the download?
In my cause Chrome will always trigger the download. So when I cancel and try to use the redirect link in my ssh CLI, it is still forbidden
it did not work for me as well…
The NVIDIA-maintained docker images on dockerhub should give you a recipe for installing cudnn without any download issues:
For example, the 18.04 base image for CUDA 10.1:
ENV CUDNN_VERSION 184.108.40.206
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-mark hold libcudnn7 && \
rm -rf /var/lib/apt/lists/*
The above is not a complete recipe, it depends on selecting the package archive correctly, which is shown in the non-cudnn base image.
Sorry for necroposting, but if someone stumble upon this issue, a solution could be:
- open a dev console for your browser and make sure you are logging the network request
- start the download
- log the second request to your file and you’ll find the link with the auth token as get param
- copy that url as argument for
wget on your remote server
This worked like a charm. Thank you :)
This works perfectly. Thanks!