実現したいこと
現在、docker-compose up --build -dでDockerを動かしたいのですが、該当のエラーコードがでてしまいます。
インターネット上にのっている様々な方法を試しましたが、解決しないため、こちらで質問させていただきました。
発生している問題・エラーメッセージ
[+] Building 59.7s (5/11) => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 32B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 34B 0.0s => [internal] load metadata for docker.io/nvidia/cuda:11.0-devel-ubuntu20.04 6.7s => CACHED [1/8] FROM docker.io/nvidia/cuda:11.0-devel-ubuntu20.04@sha256:bd7a97c99c7a2bcc183ea07e6b193727de3d180 0.0s => ERROR [2/8] RUN apt update && apt install --no-install-recommends -y software-properties-common 52.7s ------ > [2/8] RUN apt update && apt install --no-install-recommends -y software-properties-common: #0 0.638 #0 0.638 WARNING: apt does not have a stable CLI interface. Use with caution in scripts. #0 0.638 #0 0.799 Get:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease [1581 B] #0 1.029 Err:1 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease #0 1.029 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC #0 1.038 Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB] #0 1.209 Get:3 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB] #0 2.032 Get:4 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [27.5 kB] #0 2.328 Get:5 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [1174 kB] #0 2.541 Get:6 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] #0 2.974 Get:7 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB] #0 3.459 Get:8 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB] #0 5.503 Get:9 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [1816 kB] #0 10.60 Get:10 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [874 kB] #0 34.97 Get:11 http://archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages [177 kB] #0 35.45 Get:12 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB] #0 39.05 Get:13 http://archive.ubuntu.com/ubuntu focal/restricted amd64 Packages [33.4 kB] #0 39.13 Get:14 http://archive.ubuntu.com/ubuntu focal-updates/restricted amd64 Packages [1252 kB] #0 42.41 Get:15 http://archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 Packages [30.2 kB] #0 42.50 Get:16 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [1161 kB] #0 45.59 Get:17 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2245 kB] #0 51.79 Get:18 http://archive.ubuntu.com/ubuntu focal-backports/main amd64 Packages [51.2 kB] #0 51.94 Get:19 http://archive.ubuntu.com/ubuntu focal-backports/universe amd64 Packages [26.0 kB] #0 52.02 Reading package lists... #0 52.69 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 #0 52.69 E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64 InRelease' is not signed. ------ failed to solve: executor failed running [/bin/sh -c apt update && apt install --no-install-recommends -y software-properties-common]: exit code: 100
Dockerfile
ARG BASE_IMAGE=nvidia/cuda:11.0-devel-ubuntu20.04 FROM ${BASE_IMAGE} ARG PROJECT_NAME=ascender ARG USER_NAME=challenger ARG PYTHON_VERSION=3.8 ARG APPLICATION_DIRECTORY=/home/${USER_NAME}/${PROJECT_NAME} ENV DEBIAN_FRONTEND="noninteractive" \ LC_ALL="C.UTF-8" \ LANG="C.UTF-8" \ PYTHONPATH=${APPLICATION_DIRECTORY} # Following is needed to install python 3.7 RUN apt update && apt install --no-install-recommends -y software-properties-common RUN add-apt-repository ppa:deadsnakes/ppa RUN apt update && apt install --no-install-recommends -y \ git curl make ssh openssh-client \ python${PYTHON_VERSION} python3-pip python-is-python3 # Following is needed to swtich default python3 version # For detail, please check following link https://unix.stackexchange.com/questions/410579/change-the-python3-default-version-in-ubuntu RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 \ && update-alternatives --set python3 /usr/bin/python${PYTHON_VERSION} \ && pip3 install poetry # Add user. Without this, following process is executed as admin. RUN useradd -ms /bin/sh ${USER_NAME} USER ${USER_NAME} WORKDIR ${APPLICATION_DIRECTORY} # Create virtual environments inside of project. RUN poetry config virtualenvs.in-project true
docker-compose.yml
version: "3.8" services: core: runtime: nvidia environment: - NVIDIA_VISIBLE_DEVICES=all build: args: - BASE_IMAGE=nvidia/cuda:11.0-devel-ubuntu20.04 - PYTHON_VERSION=3.8 context: ../../ dockerfile: environments/Dockerfile user: 1000:1000 tty: true volumes: - ../../:/home/challenger/ascender ports: - 8000:8000
Dockerにあまり触れたことがなかったこともあり、お恥ずかしい質問で申し訳ないのですが、ご回答いただけますと幸いです。
回答1件
あなたの回答
tips
プレビュー