Problem installing NVIDIA cuDNN on Jetson Nano

Hey guys,

I have a problem when installing the libcudnn7-dev_7 package on the Jetson Nano based on the balenalib OS. I have oriented myself towards @dborgesr, who did a similar thing for the Jetson TX2 with Balena: Installing CUDA on Jetson TX2

I’ve started on a fresh Ubuntu 18.04, then installed the following components by getting the download links for the JetPack 4.2 version from the NVIDIA SDK Manager :

  • Nvidia Nano Drivers R32.1.0 (Jetson-210_Linux_R32.1.0_aarch64.tbz2)
  • CUDA 10.0.166 (cuda-repo-l4t-10-0-local-10.0.166_1.0-1_arm64.deb)
  • CUDNN 7.3.1.28 (libcudnn7_7.3.1.28-1+cuda10.0_arm64.deb)

Now when I want to install the libcudnn7-dev_7 package (libcudnn7-dev_7.3.1.28-1+cuda10.0_arm64.deb), the following error occurs:

dpkg: error processing package libcudnn7-dev (–install):
installed libcudnn7-dev package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
libcudnn7-dev
The command ‘/bin/sh -c dpkg -i /tmp/libcudnn7-dev_7.3.1.28-1+cuda10.0_arm64.deb’ returned a non-zero code: 1

Here is the whole pipeline in Docker:

Use Ubuntu 18.04 as a starting point

FROM balenalib/aarch64-ubuntu:cosmic
LABEL io.balena.device-type=“jetson-nano”

Cross-compile on x86-64

RUN [ “cross-build-start” ]

Install basic packages

RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends
less kmod nano net-tools ifupdown iputils-ping i2c-tools usbutils
apt-utils dialog bzip2 ca-certificates curl pciutils sudo unp wget

WORKDIR /tmp

Install Nano drivers R32.1.0

RUN sudo apt-get install -y pigz lbzip2
RUN wget -O /usr/sbin/gdrivedl ‘https://f.mjh.nz/gdrivedl
RUN chmod +x /usr/sbin/gdrivedl
RUN gdrivedl 1NxMO89GjX5-jHp68Du9DIA97RCn3l-Ti
RUN tar -xvjf /tmp/Jetson-210_Linux_R32.1.0_aarch64.tbz2
RUN chown root /etc/passwd /etc/sudoers /usr/lib/sudo/sudoers.so /etc/sudoers.d/README
RUN /tmp/Linux_for_Tegra/apply_binaries.sh -r /

Install CUDA 10.0.166

RUN gdrivedl 12e7O0qPj5FquNEsY1mVBeg4faVIHlFXl
RUN dpkg -i /tmp/cuda-repo-l4t-10-0-local-10.0.166_1.0-1_arm64.deb
RUN apt-key add /var/cuda-repo--local/*.pub
RUN apt-get -y update && apt-get install -y gnupg
RUN apt-get -y --allow-downgrades install cuda-toolkit-10-0 libgomp1 libfreeimage-dev libopenmpi-dev openmpi-bin
ENV PATH="{PATH}:/usr/local/cuda-10.0/bin" ENV LD_LIBRARY_PATH="{LD_LIBRARY_PATH}:/usr/local/cuda-10.0/lib64"

Install CUDNN 7.3.1.28

RUN gdrivedl 1r9UzcO9xQKJGbX-3AsbQQAWWsrLqKgBU
RUN gdrivedl 1Z9hPGw8XlxmCf-TYLx9_dvR-XTTnvmTg
RUN gdrivedl 1IRt8mMhQe3PMRadtFIApUbk2yQ0xMEsK
RUN dpkg -i /tmp/libcudnn7_7.3.1.28-1+cuda10.0_arm64.deb
RUN dpkg -i /tmp/libcudnn7-dev_7.3.1.28-1+cuda10.0_arm64.deb <- FAILS HERE
RUN dpkg -i /tmp/libcudnn7-doc_7.3.1.28-1+cuda10.0_arm64.deb

Any idea what could be wrong?

Thanks,
Max

Hi,
thanks for reaching out to support. I have contacted an engineer that has worked on this before, hoping he will be able to give you some insights…
Regards
Thomas

That would be awesome, thanks!

Hi,
What you are doing looks correct, but maybe things would be different on the Nano. Is that the whole error you are getting? Because it is hard to understand what is going on from those logs.
Kind regards,
Theodor

Hi @maxritter I wonder if you have looked at this example https://github.com/acostach/nano-sample-app/blob/master/Dockerfile.cudasamples I think it should install most of what you want and not produce a massive image :slight_smile: