nvidia/cuda docker image gpg error

Jinha Song·2022년 6월 26일
1

Error 내용

  • nvidia/cuda docker image 중 ubuntu20.04 base image에서 apt gpg key가 잘못되어 apt update 명령어부터 error 발생
...
Hit:6 http://archive.ubuntu.com/ubuntu focal-updates InRelease               
Hit:7 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists... Done
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.
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.
...

해결방법

  • docker 빌드 시 아래 구문들을 추가하여 key 삭제 및 올바른 key로 재등록
RUN rm /etc/apt/sources.list.d/cuda.list
RUN rm /etc/apt/sources.list.d/nvidia-ml.list
RUN apt-key del 7fa2af80
RUN apt-get update && apt-get install -y --no-install-recommends wget
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-keyring_1.0-1_all.deb
RUN dpkg -i cuda-keyring_1.0-1_all.deb
profile
Jinha Song

0개의 댓글