Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPG error while building docker #7951

Closed
chx9 opened this issue May 10, 2022 · 9 comments · Fixed by #8215
Closed

GPG error while building docker #7951

chx9 opened this issue May 10, 2022 · 9 comments · Fixed by #8215
Assignees

Comments

@chx9
Copy link

chx9 commented May 10, 2022

command:

sudo docker build -t mmdet-serve:latest docker/serve/

error :

W: GPG error: https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/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/ubuntu1804/x86_64  InRelease' is not signed.
The command '/bin/sh -c apt-get update &&     DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y     ca-certificates     g++     openjdk-11-jre-headless     ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6     && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
@hhaAndroid
Copy link
Collaborator

@del-zhenwu did you encounter this problem?

@del-zhenwu
Copy link
Collaborator

@del-zhenwu did you encounter this problem?

I didnot found this issue in mmdet building process. But I found the similar problem in mmpose image building:

[2022-05-09T11:54:08.266Z] Step 8/12 : RUN apt update -y && apt install -y --no-install-recommends software-properties-common libglib2.0-0 libsm6 libxrender-dev libxext6 libturbojpeg libprotobuf-dev protobuf-compiler     && python -m pip install protobuf

[2022-05-09T11:54:10.847Z]  ---> Running in a9d40cc4a39e

[2022-05-09T11:54:11.796Z] 

[2022-05-09T11:54:11.796Z] WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

[2022-05-09T11:54:11.796Z] 

[2022-05-09T11:54:12.379Z] Hit:1 http://archive.ubuntu.com/ubuntu bionic InRelease

[2022-05-09T11:54:12.643Z] Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]

[2022-05-09T11:54:12.643Z] Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]

[2022-05-09T11:54:13.590Z] Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]

[2022-05-09T11:54:13.853Z] Get:5 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [29.8 kB]

[2022-05-09T11:54:14.120Z] Get:6 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [942 kB]

[2022-05-09T11:54:14.120Z] Get:7 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1498 kB]

[2022-05-09T11:54:14.693Z] Get:8 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [2272 kB]

[2022-05-09T11:54:15.271Z] Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [3168 kB]

[2022-05-09T11:54:15.271Z] Get:10 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [2734 kB]

[2022-05-09T11:54:15.538Z] Get:11 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [12.2 kB]

[2022-05-09T11:54:15.538Z] Get:12 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [12.9 kB]

[2022-05-09T11:54:15.799Z] Get:13 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [909 kB]

[2022-05-09T11:54:16.750Z] Get:14 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64  InRelease [1575 B]

[2022-05-09T11:54:16.750Z] Err:14 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64  InRelease

[2022-05-09T11:54:16.750Z]   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC

[2022-05-09T11:54:17.011Z] Ign:15 https://developer.download.nvidia.cn/compute/machine-learning/repos/ubuntu1804/x86_64  InRelease

[2022-05-09T11:54:18.401Z] Hit:16 https://developer.download.nvidia.cn/compute/machine-learning/repos/ubuntu1804/x86_64  Release

[2022-05-09T11:54:21.222Z] Reading package lists...

[2022-05-09T11:54:21.222Z] W: GPG error: https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu1804/x86_64  InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC

[2022-05-09T11:54:21.222Z] E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64  InRelease' is no longer signed.

[2022-05-09T11:54:22.199Z] The command '/bin/sh -c apt update -y && apt install -y --no-install-recommends software-properties-common libglib2.0-0 libsm6 libxrender-dev libxext6 libturbojpeg libprotobuf-dev protobuf-compiler     && python -m pip install protobuf' returned a non-zero code: 100

script returned exit code 100

@atinfinity
Copy link

I encountered same problem.

git clone https://github.com/open-mmlab/mmdetection.git -b v2.24.1
cd mmdetection/docker
docker build -t mmdetection:2.24.1 .

It occurs the following message. This problem is explained in https://developer.nvidia.com/blog/updating-the-cuda-linux-gpg-repository-key/.

W: GPG error: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/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/ubuntu1804/x86_64  InRelease' is not signed.
The command '/bin/sh -c apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6     && apt-get clean     && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

And, same problem was fixed open-mmlab/mmsegmentation#1534 in mmsegmentation.
So, I applied same patch to Dockerfile in mmdetection.

--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -8,6 +8,10 @@ ENV TORCH_CUDA_ARCH_LIST="6.0 6.1 7.0+PTX"
 ENV TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
 ENV CMAKE_PREFIX_PATH="$(dirname $(which conda))/../"
 
+# To fix GPG key error when running apt-get update
+RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
+RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
+
 RUN apt-get update && apt-get install -y ffmpeg libsm6 libxext6 git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 \
     && apt-get clean \
     && rm -rf /var/lib/apt/lists/*

As a result, I could build docker image.

@atinfinity
Copy link

atinfinity commented May 10, 2022

I found that this problem is fixed in #7915.

@hhaAndroid
Copy link
Collaborator

I found that this problem is fixed in #7915.

OK

@chx9
Copy link
Author

chx9 commented May 12, 2022

thank you

@hhaAndroid
Copy link
Collaborator

I will close this issue, if you have the same problem in the future, welcome to reopen it.

@smidm
Copy link

smidm commented Jun 17, 2022

the referenced pull request #7915 was rejected, the bug still persists

@atinfinity
Copy link

atinfinity commented Jun 17, 2022

@smidm I created Pull Request #8215.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants