Skip to content

Commit

Permalink
[ubuntu24.04] remove usage of deprecated 'apt-key add'
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Desiniotis <[email protected]>
  • Loading branch information
cdesiniotis committed Dec 12, 2024
1 parent 070e32e commit 44104df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions ubuntu24.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ RUN echo "TARGETARCH=$TARGETARCH"
ADD install.sh /tmp

# Fetch GPG keys for CUDA repo
RUN apt-key del 7fa2af80 && OS_ARCH=${TARGETARCH/amd64/x86_64} && OS_ARCH=${OS_ARCH/arm64/sbsa} && \
apt-key adv --fetch-keys "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/${OS_ARCH}/3bf863cc.pub"
RUN apt-key del 7fa2af80 3bf863cc && \
apt-get update && apt-get install -y --no-install-recommends curl gpg && \
OS_ARCH=${TARGETARCH/amd64/x86_64} && OS_ARCH=${OS_ARCH/arm64/sbsa} && \
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/${OS_ARCH}/3bf863cc.pub | gpg --dearmor -o /etc/apt/keyrings/cuda-3bf863cc.pub && \
echo "deb [signed-by=/etc/apt/keyrings/cuda-3bf863cc.pub] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/${OS_ARCH} /" > /etc/apt/sources.list.d/cuda.list

RUN usermod -o -u 0 -g 0 _apt && \
/tmp/install.sh depinstall
Expand Down
7 changes: 5 additions & 2 deletions ubuntu24.04/precompiled/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ ENV NVIDIA_VISIBLE_DEVICES=void
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections

# Fetch GPG keys for CUDA repo
RUN apt-key del 7fa2af80 && \
apt-key adv --fetch-keys "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/3bf863cc.pub"
RUN apt-key del 7fa2af80 3bf863cc && \
apt-get update && apt-get install -y --no-install-recommends curl gpg && \
OS_ARCH=${TARGETARCH/amd64/x86_64} && OS_ARCH=${OS_ARCH/arm64/sbsa} && \
curl -fsSL https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/${OS_ARCH}/3bf863cc.pub | gpg --dearmor -o /etc/apt/keyrings/cuda-3bf863cc.pub && \
echo "deb [signed-by=/etc/apt/keyrings/cuda-3bf863cc.pub] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/${OS_ARCH} /" > /etc/apt/sources.list.d/cuda.list

RUN dpkg --add-architecture i386 && \
apt-get update && apt-get install -y --no-install-recommends \
Expand Down

0 comments on commit 44104df

Please sign in to comment.