Hello guys,
I am making a docker image on my jetson nano to isolate some package installations from my host installation, I need to install some packages in the docker image (based on nvcr.io/nvidia/l4t-base:r32.3.1 image) and I tried to add repositories available in my host installation (Jetpack 4.3) in my L4T docker image, which are:
“https://repo.download.nvidia.com/jetson/common r32 main”
and
“https://repo.download.nvidia.com/jetson/t210 r32 main”
I failed to do an apt-get update
as gpg keys for these repositories were not added to my apt, because I could not find where to get it from.
The I tried to directly install packages named nvidia-l4t-apt-source
and nvidia-l4t-ccp-t210ref
downloaded directly using my host [I had also had to add `TEGRA_CHIPID 0x21` to /etc/nv_boot_control.conf in my docker]. As I read here that nvidia-l4t-apt-source
configures the repositories according to the architecture of your board, and it depends on nvidia-l4t-ccp-t210ref
in my jetson Nano. The problem is, while installing nvidia-l4t-ccp-t210ref
with dpkg, I get this error message:
L4T Debian install is not supported on your configuration You should install an L4T image from the latest releases - starting from r32.3+ to have Debian package support
I extracted the debian package itself and saw these lines in the DEBIAN/preinst script:
#Don't allow installing package on a system which doesn't have it pre-installed
case "$1" in install) echo "L4T Debian install is not supported on your configuration" echo "You should install an L4T image from the latest releases - starting" echo "from r32.3+ to have Debian package support" exit 1 ;; *) ;; esac
which clearly says you are doing it wrong if you are installing this package!! It has to be pre-installed (sorry that I could not format this right).
My question is, WHY?!
Then how can I have these repositories inside my l4t docker image?
I am confused. Any help will be appreciated.
------------------ UPDATE: ------------------
I also have seen that installing these packages is exactly equivalent to making the /etc/apt/sources.list.d/nvidia-l4t-apt-source.list
with the relevant content, for jetson Nano it is:
deb https://repo.download.nvidia.com/jetson/common r32 main
deb https://repo.download.nvidia.com/jetson/t210 r32 main
and again with running apt-get update
in the docker, the missing GPG causes error:
W: GPG error: https://repo.download.nvidia.com/jetson/common r32 InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 0D296FFB880FB004
E: The repository ‘https://repo.download.nvidia.com/jetson/common r32 InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: https://repo.download.nvidia.com/jetson/t210 r32 InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 0D296FFB880FB004
E: The repository ‘https://repo.download.nvidia.com/jetson/t210 r32 InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Seems the only solution is to know where to get the GPG key from and add it to the apt.
------------------ ANOTHER UPDATE: ------------------
I can export the keys on my host via apt-key exportall > trusted-keys
, copy that into my docker image and import it with apt-key add trusted-keys
, it works perfectly, but still there is a question how I can get the original key in my docker image, e.g. without copying exported keys from my host. This method will break when the key changes,