cog icon indicating copy to clipboard operation
cog copied to clipboard

GPG error?

Open EGjoni opened this issue 2 years ago • 1 comments

I'm trying to build from an Ubuntu 18.04 machine.

I get the following error.

=> ERROR [stage-0  2/11] RUN --mount=type=cache,target=/var/cache/apt set -eux; apt-get update -qq; apt-get install -qqy --no-install-recommends curl; rm -rf /var/lib/apt/lists/*; TINI_VERS  150.8s
------
 > [stage-0  2/11] RUN --mount=type=cache,target=/var/cache/apt set -eux; apt-get update -qq; apt-get install -qqy --no-install-recommends curl; rm -rf /var/lib/apt/lists/*; TINI_VERSION=v0.19.0; TINI_ARCH="$(dpkg --print-architecture)"; curl -sSL -o /sbin/tini "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TINI_ARCH}"; chmod +x /sbin/tini:
#0 149.0 + apt-get update -qq
#0 150.8 W: GPG error: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  InRelease: At least one invalid signature was encountered.
#0 150.8 E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  InRelease' is not signed.
#0 150.8 W: GPG error: http://security.ubuntu.com/ubuntu jammy-security InRelease: At least one invalid signature was encountered.
#0 150.8 E: The repository 'http://security.ubuntu.com/ubuntu jammy-security InRelease' is not signed.
#0 150.8 W: GPG error: http://archive.ubuntu.com/ubuntu jammy InRelease: At least one invalid signature was encountered.
#0 150.8 E: The repository 'http://archive.ubuntu.com/ubuntu jammy InRelease' is not signed.
#0 150.8 W: GPG error: http://archive.ubuntu.com/ubuntu jammy-updates InRelease: At least one invalid signature was encountered.
#0 150.8 E: The repository 'http://archive.ubuntu.com/ubuntu jammy-updates InRelease' is not signed.
#0 150.8 W: GPG error: http://archive.ubuntu.com/ubuntu jammy-backports InRelease: At least one invalid signature was encountered.
#0 150.8 E: The repository 'http://archive.ubuntu.com/ubuntu jammy-backports InRelease' is not signed.
------
Dockerfile:6
--------------------
   5 |     ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/usr/local/nvidia/lib64:/usr/local/nvidia/bin
   6 | >>> RUN --mount=type=cache,target=/var/cache/apt set -eux; \
   7 | >>> apt-get update -qq; \
   8 | >>> apt-get install -qqy --no-install-recommends curl; \
   9 | >>> rm -rf /var/lib/apt/lists/*; \
  10 | >>> TINI_VERSION=v0.19.0; \
  11 | >>> TINI_ARCH="$(dpkg --print-architecture)"; \
  12 | >>> curl -sSL -o /sbin/tini "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TINI_ARCH}"; \
  13 | >>> chmod +x /sbin/tini
  14 |     ENTRYPOINT ["/sbin/tini", "--"]
--------------------
ERROR: failed to solve: process "/bin/sh -c set -eux; apt-get update -qq; apt-get install -qqy --no-install-recommends curl; rm -rf /var/lib/apt/lists/*; TINI_VERSION=v0.19.0; TINI_ARCH=\"$(dpkg --print-architecture)\"; curl -sSL -o /sbin/tini \"https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TINI_ARCH}\"; chmod +x /sbin/tini" did not complete successfully: exit code: 100
ⅹ Failed to build Docker image: exit status 1

After browsing other issues, this error was purportedly resolved in cog 8.2. I'm on 8.6, so I'm not sure if this is a regression or I'm just doing something wrong?

My cog debug output looks as follows

#syntax=docker/dockerfile:1.4
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/usr/local/nvidia/lib64:/usr/local/nvidia/bin
RUN --mount=type=cache,target=/var/cache/apt set -eux; \
apt-get update -qq; \
apt-get install -qqy --no-install-recommends curl; \
rm -rf /var/lib/apt/lists/*; \
TINI_VERSION=v0.19.0; \
TINI_ARCH="$(dpkg --print-architecture)"; \
curl -sSL -o /sbin/tini "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TINI_ARCH}"; \
chmod +x /sbin/tini
ENTRYPOINT ["/sbin/tini", "--"]
ENV PATH="/root/.pyenv/shims:/root/.pyenv/bin:$PATH"
RUN --mount=type=cache,target=/var/cache/apt apt-get update -qq && apt-get install -qqy --no-install-recommends \
        make \
        build-essential \
        libssl-dev \
        zlib1g-dev \
        libbz2-dev \
        libreadline-dev \
        libsqlite3-dev \
        wget \
        curl \
        llvm \
        libncurses5-dev \
        libncursesw5-dev \
        xz-utils \
        tk-dev \
        libffi-dev \
        liblzma-dev \
        git \
        ca-certificates \
        && rm -rf /var/lib/apt/lists/*
RUN curl -s -S -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash && \
        git clone https://github.com/momo-lab/pyenv-install-latest.git "$(pyenv root)"/plugins/pyenv-install-latest && \
        pyenv install-latest "3.11.4" && \
        pyenv global $(pyenv install-latest --print "3.11.4") && \
        pip install "wheel<1"
COPY .cog/tmp/build2912669254/cog-0.0.1.dev-py3-none-any.whl /tmp/cog-0.0.1.dev-py3-none-any.whl
RUN --mount=type=cache,target=/root/.cache/pip pip install /tmp/cog-0.0.1.dev-py3-none-any.whl
COPY .cog/tmp/build2912669254/requirements.txt /tmp/requirements.txt
RUN --mount=type=cache,target=/root/.cache/pip pip install -r /tmp/requirements.txt
RUN echo env is ready!
WORKDIR /src
EXPOSE 5000
CMD ["python", "-m", "cog.server.http"]
COPY . /src

My project is using torch, so I also tried with --use-base-image=false

This results in a similar error, except now the repository URLs for which the invalid signatures were encountered have changed

=> ERROR [stage-0 2/9] RUN --mount=type=cache,target=/var/cache/apt set -eux; apt-get update -qq; apt-get install -qqy --no-install-recommends curl; rm -rf /var/lib/apt/lists/*; TINI_VERSION  13.0s
------                                                                                                                                                                                                 
 > [stage-0 2/9] RUN --mount=type=cache,target=/var/cache/apt set -eux; apt-get update -qq; apt-get install -qqy --no-install-recommends curl; rm -rf /var/lib/apt/lists/*; TINI_VERSION=v0.19.0; TINI_ARCH="$(dpkg --print-architecture)"; curl -sSL -o /sbin/tini "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TINI_ARCH}"; chmod +x /sbin/tini:
#0 11.71 + apt-get update -qq
#0 12.93 W: GPG error: http://deb.debian.org/debian bookworm InRelease: At least one invalid signature was encountered.
#0 12.93 E: The repository 'http://deb.debian.org/debian bookworm InRelease' is not signed.
#0 12.93 W: GPG error: http://deb.debian.org/debian bookworm-updates InRelease: At least one invalid signature was encountered.
#0 12.93 E: The repository 'http://deb.debian.org/debian bookworm-updates InRelease' is not signed.
#0 12.93 W: GPG error: http://deb.debian.org/debian-security bookworm-security InRelease: At least one invalid signature was encountered.
#0 12.93 E: The repository 'http://deb.debian.org/debian-security bookworm-security InRelease' is not signed.
------
Dockerfile:6
--------------------
   5 |     ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/usr/local/nvidia/lib64:/usr/local/nvidia/bin
   6 | >>> RUN --mount=type=cache,target=/var/cache/apt set -eux; \
   7 | >>> apt-get update -qq; \
   8 | >>> apt-get install -qqy --no-install-recommends curl; \
   9 | >>> rm -rf /var/lib/apt/lists/*; \
  10 | >>> TINI_VERSION=v0.19.0; \
  11 | >>> TINI_ARCH="$(dpkg --print-architecture)"; \
  12 | >>> curl -sSL -o /sbin/tini "https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TINI_ARCH}"; \
  13 | >>> chmod +x /sbin/tini
  14 |     ENTRYPOINT ["/sbin/tini", "--"]
--------------------
ERROR: failed to solve: process "/bin/sh -c set -eux; apt-get update -qq; apt-get install -qqy --no-install-recommends curl; rm -rf /var/lib/apt/lists/*; TINI_VERSION=v0.19.0; TINI_ARCH=\"$(dpkg --print-architecture)\"; curl -sSL -o /sbin/tini \"https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${TINI_ARCH}\"; chmod +x /sbin/tini" did not complete successfully: exit code: 100
ⅹ Failed to build Docker image: exit status 1

There's plenty of disk space available, and no amount of docker pruning of anything seems to resolve it.

cog version is cog version 0.8.6 (built 2023-08-07T21:51:56Z)

EGjoni avatar Sep 10 '23 15:09 EGjoni

same error

 => ERROR [stage-1 2/7] RUN --mount=type=cache,target=/var/cache/apt set  14.7s


W: chmod 0600 of file /var/lib/apt/lists/partial/developer.download.nvidia.com_compute_cuda_repos_ubuntu2204_x86%5f64_InRelease failed - Item::QueueURI (30: Read-only file system)
W: GPG error: http://archive.ubuntu.com/ubuntu jammy InRelease: Couldn't create temporary file /tmp/apt.conf.yP9qrp for passing config to apt-key
E: The repository 'http://archive.ubuntu.com/ubuntu jammy InRelease' is not signed.
W: chown to root:root of file /var/lib/apt/lists/partial/developer.download.nvidia.com_compute_cuda_repos_ubuntu2204_x86%5f64_InRelease failed - 400::URIFailure (30: Read-only file system)
W: chmod 0644 of file /var/lib/apt/lists/partial/developer.download.nvidia.com_compute_cuda_repos_ubuntu2204_x86%5f64_InRelease failed - 400::URIFailure (30: Read-only file system)
W:GPG error: https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64 InRelease: Couldn't create temporary file /tmp/apt.conf.UlW99X for passing config to apt-key
E: The repository 'https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64 InRelease' is not signed.
E: The repository 'http://archive.ubuntu.com/ubuntu jammy-updates Release' does not have a Release file.
E: The repository 'http://archive.ubuntu.com/ubuntu jammy-backports Release' does not have a Release file.

ltm920716 avatar Jan 28 '24 15:01 ltm920716