Update centos8 mirrors

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2022-02-01 13:54:24 +01:00
parent 5c76493642
commit f097af79ca
2 changed files with 17 additions and 0 deletions

View File

@ -42,6 +42,15 @@ RUN GOPATH=/artifacts go install -ldflags="-s -w -X 'main.Version=${VERSION}'" .
FROM nvidia/cuda:${CUDA_VERSION}-base-${BASE_DIST} FROM nvidia/cuda:${CUDA_VERSION}-base-${BASE_DIST}
ARG BASE_DIST
# See https://www.centos.org/centos-linux-eol/
# and https://stackoverflow.com/a/70930049
RUN [[ "${BASE_DIST}" != "centos8" ]] || \
( \
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-* \
)
ENV NVIDIA_DISABLE_REQUIRE="true" ENV NVIDIA_DISABLE_REQUIRE="true"
ENV NVIDIA_VISIBLE_DEVICES=all ENV NVIDIA_VISIBLE_DEVICES=all
ENV NVIDIA_DRIVER_CAPABILITIES=utility ENV NVIDIA_DRIVER_CAPABILITIES=utility

View File

@ -1,6 +1,14 @@
ARG BASEIMAGE ARG BASEIMAGE
FROM ${BASEIMAGE} FROM ${BASEIMAGE}
ARG BASEIMAGE
# See https://www.centos.org/centos-linux-eol/
# and https://stackoverflow.com/a/70930049
RUN [[ "${BASEIMAGE}" != "centos:8" ]] || \
( \
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* && \
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-* \
)
RUN yum install -y \ RUN yum install -y \
ca-certificates \ ca-certificates \
wget \ wget \