iot-salzburg / gpu-jupyter

GPU-Jupyter: Leverage the flexibility of Jupyterlab through the power of your NVIDIA GPU to run your code from Tensorflow and Pytorch in collaborative notebooks on the GPU.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build docekr image failed NO_PUBKEY

alexkutsan opened this issue · comments

Looks like there some issues in public gpg signatures of nvidia:

CI check with error: https://github.com/alexkutsan/gpu-jupyter/runs/6256137815?check_suite_focus=true

 Reading package lists...
W: GPG error: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64  InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64  InRelease' is not signed.
The command '/bin/bash -o pipefail -c apt-get update --yes &&     apt-get upgrade --yes &&     apt-get install --yes --no-install-recommends     ca-certificates     fonts-liberation     locales     pandoc     run-one     sudo     tini     wget &&     apt-get clean && rm -rf /var/lib/apt/lists/* &&     echo "en_US.UTF-8 UTF-8" > /etc/locale.gen &&     locale-gen' returned a non-zero code: 100

Add RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC before RUN apt-get update --yes works for me

The solution suggested by @grapefruitL didn't work for me. However, I found the solution in this blog post from Nvidia. I ended up adding something like this:

RUN apt-key del 7fa2af80 \
    && wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb \
    && dpkg -i cuda-keyring_1.0-1_all.deb \
    && sed -i '/developer\.download\.nvidia\.com\/compute\/cuda\/repos/d' /etc/apt/sources.list \
    && rm -f /etc/apt/sources.list.d/cuda*.list /etc/apt/sources.list.d/nvidia-ml.list

yeah I just ran into this myself trying to use an image based on 11.2

@giacomolanciano solution is correct (the blog post from nvidia is not quite complete).

only thing I'd add is a cleanup step / do it in /tmp/:

RUN apt-key del 7fa2af80 && \
	cd /tmp/ && \
	wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb && \
	dpkg -i cuda-keyring_1.0-1_all.deb && \
	rm cuda-keyring_1.0-1_all.deb && \
	sed -i '/developer\.download\.nvidia\.com\/compute\/cuda\/repos/d' /etc/apt/sources.list && \
	rm -f /etc/apt/sources.list.d/cuda*.list /etc/apt/sources.list.d/nvidia-ml.list

@ChristophSchranz this can be closed, but it may be helpful to link back to this solution in the README.