実現したいこと
kaggleのGPU版Docker Imageをビルドしたいのですが、
CUDA関連のパッケージをインストールする段階で止まってしまいます。
だいぶ詰まってしまったので、解決策教えて頂きたいです。
エラーメッセージ
=> [stage-1 2/14] ADD clean-layer.sh /tmp/clean-layer.sh 6.5s => [stage-1 3/14] COPY --from=nvidia /etc/apt/sources.list.d/cuda.list /etc/apt/sources.list.d/ 0.3s => [stage-1 4/14] COPY --from=nvidia /etc/apt/sources.list.d/nvidia-ml.list /etc/apt/sources.list.d/ 0.2s => [stage-1 5/14] COPY --from=nvidia /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/cuda.gpg 0.2s => [stage-1 6/14] RUN sed -i 's/deb https://developer.download.nvidia.com/deb http://developer.download.nvi 0.7s => ERROR [stage-1 7/14] RUN apt-get update && apt-get install -y --no-install-recommends cuda-cupti-11.0 5.9s ------ > [stage-1 7/14] RUN apt-get update && apt-get install -y --no-install-recommends cuda-cupti-11.0 cuda-cudart-11.0 cuda-cudart-dev-11.0 cuda-libraries-11.0 cuda-libraries-dev-11.0 cuda-nvml-dev-11.0 cuda-minimal-build-11.0 cuda-command-line-tools-11.0 libcudnn8=8.0.4.30-1+cuda11.0 libcudnn8-dev=8.0.4.30-1+cuda11.0 libnccl2=2.7.8-1+cuda11.0 libnccl-dev=2.7.8-1+cuda11.0 && ln -s /usr/local/cuda-11.0 /usr/local/cuda && ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 && /tmp/clean-layer.sh: #13 2.386 Ign:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 InRelease #13 2.401 Get:3 http://packages.cloud.google.com/apt gcsfuse-bionic InRelease [5385 B] #13 2.482 Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] #13 2.541 Get:6 http://packages.cloud.google.com/apt cloud-sdk-bionic InRelease [6786 B] #13 2.609 Ign:2 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 InRelease #13 2.756 Get:7 http://packages.cloud.google.com/apt cloud-sdk InRelease [6739 B] #13 2.916 Hit:9 http://archive.ubuntu.com/ubuntu bionic InRelease #13 3.040 Err:4 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 Release #13 3.040 Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 152.199.39.144 443] #13 3.324 Get:10 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] #13 3.655 Err:8 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 Release #13 3.655 Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown. Could not handshake: Error in the certificate verification. [IP: 152.199.39.144 443] #13 4.568 Get:11 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] #13 4.878 Reading package lists... #13 5.850 W: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/InRelease: No system certificates available. Try installing ca-certificates. #13 5.850 W: http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/InRelease: No system certificates available. Try installing ca-certificates. #13 5.850 W: http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/Release: No system certificates available. Try installing ca-certificates. #13 5.850 E: The repository 'http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 Release' does not have a Release file. #13 5.850 E: Release file for http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease is not valid yet (invalid for another 8h 41min 46s). Updates for this repository will not be applied. #13 5.850 W: http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/Release: No system certificates available. Try installing ca-certificates. #13 5.850 E: The repository 'http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 Release' does not have a Release file. #13 5.850 E: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet (invalid for another 8h 42min 39s). Updates for this repository will not be applied. #13 5.850 E: Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease is not valid yet (invalid for another 8h 43min 48s). Updates for this repository will not be applied. ------ executor failed running [/bin/sh -c apt-get update && apt-get install -y --no-install-recommends cuda-cupti-$CUDA_VERSION cuda-cudart-$CUDA_VERSION cuda-cudart-dev-$CUDA_VERSION cuda-libraries-$CUDA_VERSION cuda-libraries-dev-$CUDA_VERSION cuda-nvml-dev-$CUDA_VERSION cuda-minimal-build-$CUDA_VERSION cuda-command-line-tools-$CUDA_VERSION libcudnn8=8.0.4.30-1+cuda$CUDA_VERSION libcudnn8-dev=8.0.4.30-1+cuda$CUDA_VERSION libnccl2=2.7.8-1+cuda$CUDA_VERSION libnccl-dev=2.7.8-1+cuda$CUDA_VERSION && ln -s /usr/local/cuda-$CUDA_VERSION /usr/local/cuda && ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 && /tmp/clean-layer.sh]: exit code: 100
Dockerfileの該当箇所
Dockerfile
1RUN apt-get update && apt-get install -y --no-install-recommends \ 2 cuda-cupti-$CUDA_VERSION \ 3 cuda-cudart-$CUDA_VERSION \ 4 cuda-cudart-dev-$CUDA_VERSION \ 5 cuda-libraries-$CUDA_VERSION \ 6 cuda-libraries-dev-$CUDA_VERSION \ 7 cuda-nvml-dev-$CUDA_VERSION \ 8 cuda-minimal-build-$CUDA_VERSION \ 9 cuda-command-line-tools-$CUDA_VERSION \ 10 libcudnn8=8.0.4.30-1+cuda$CUDA_VERSION \ 11 libcudnn8-dev=8.0.4.30-1+cuda$CUDA_VERSION \を 12 libnccl2=2.7.8-1+cuda$CUDA_VERSION \ 13 libnccl-dev=2.7.8-1+cuda$CUDA_VERSION && \ 14 ln -s /usr/local/cuda-$CUDA_VERSION /usr/local/cuda && \ 15 ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 && \ 16 /tmp/clean-layer.sh
試したこと
- エラー文の通りca-certificatesを事前にインストールするようにDockerfileに追加するも変わらず
Dockerfile
1RUN apt-get update && apt-get install -y ca-certificates
- 事前に認証を無効化するようにDockerfileに追加するも変わらず
Dockerfile
1RUN touch /etc/apt/apt.conf.d/99verify-peer.conf \ 2&& echo >>/etc/apt/apt.conf.d/99verify-peer.conf "Acquire { https::Verify-Peer false }"
- dockerのビルドキャシュを削除してからビルドするも変わらず
docker system prune
- WSL特有の問題かと思い、非WSLのUbuntuを別ドライブにインストールして試してみるも同じエラー
実行環境
- Windows11(Microsoft Windows [Version 10.0.22000.168])
- Ubuntu20.04 LTS on WSL2
- NVIDIA Drivers for CUDA on WSL 471.21
- Docker Desktop: 3.6.0(67351) Engine: 20.10.8
参考にしたサイト
あなたの回答
tips
プレビュー