I’m trying to get CUDA to work on various Jetson devices with Balena, following these instructions. The line This means that installing CUDA is as simple as issuing the following command or including it in your Dockerfile:
apt-get install -y nvidia-l4t-cuda
sounds like a dream to anybody who’s worked with Jetsons before, implying a trivial Dockerfile
like this should work:
FROM balenalib/jetson-xavier-nx-devkit-debian:bullseye-build
RUN apt-get update && apt-get install -y nvidia-l4t-cuda
but this fails with:
The following packages have unmet dependencies:
nvidia-l4t-wayland : Depends: libffi6 but it is not installable
I think there’s a newer version of libffi installed, which might or might not be compatible if we care to try to fool it, but that seems sketchy. That same error comes up with a lot of other base images, including debian bookworm.
FROM balenalib/jetson-xavier-ubuntu:focal-build
RUN apt-get update && apt-get install -y nvidia-l4t-cuda
fails with:
The following packages have unmet dependencies:
nvidia-l4t-cuda : Depends: nvidia-l4t-3d-core (= 32.7.4-20230608211515) but it is not going to be installed
Trying again…
FROM balenalib/jetson-xavier-ubuntu:kinetic-build
RUN apt-get update && apt-get install -y nvidia-l4t-cuda
fails to even get past apt-get update
with:
E: The repository 'http://ports.ubuntu.com/ubuntu-ports kinetic Release' does not have a Release file.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports kinetic-updates Release' does not have a Release file.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports kinetic-backports Release' does not have a Release file.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports kinetic-security Release' does not have a Release file.
Going back further:
FROM balenalib/jetson-xavier-debian:buster-build
RUN apt-get update && apt-get install -y nvidia-l4t-cuda
Fails because buster doesn’t understand .zst
files:
Preparing to unpack .../16-nvidia-l4t-core_32.7.4-20230608211515_arm64.deb ...
Pre-installing... skip compatibility checking.
Unpacking nvidia-l4t-core (32.7.4-20230608211515) ...
dpkg-deb: error: archive '/tmp/apt-dpkg-install-8rp6Vm/16-nvidia-l4t-core_32.7.4-20230608211515_arm64.deb' uses unknown compression for member 'data.tar.zst', giving up
dpkg: error processing archive /tmp/apt-dpkg-install-8rp6Vm/16-nvidia-l4t-core_32.7.4-20230608211515_arm64.deb (--unpack):
dpkg-deb --fsys-tarfile subprocess returned error exit status 2
Errors were encountered while processing:
/tmp/apt-dpkg-install-8rp6Vm/16-nvidia-l4t-core_32.7.4-20230608211515_arm64.deb
This only one base image I’ve found that works is Ubuntu bionic (18.04), which is unfortunate because Ubuntu-bionic (18.04) is EOL, and even NVIDIA has finally added support for focal/20.04.
Any pointers on getting something vaguely-modern to build the way it’s supposed to?