Skip to content

Commit 4de496f

Browse files
committed
Add rockylinux 8 as an RPM builder to make sure packages have all the features newer releases require
Signed-off-by: Ehren Bendler <[email protected]>
1 parent f0f9f37 commit 4de496f

File tree

18 files changed

+59
-52
lines changed

18 files changed

+59
-52
lines changed

.github/workflows/image.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,19 @@ jobs:
3333
target:
3434
- ubuntu18.04-arm64
3535
- ubuntu18.04-amd64
36-
- centos7-aarch64
37-
- centos7-x86_64
36+
- rhel7-aarch64
37+
- rhel7-x86_64
38+
- rhel8-aarch64
39+
- rhel8-x86_64
3840
ispr:
3941
- ${{ github.ref_name != 'main' && !startsWith( github.ref_name, 'release-' ) }}
4042
exclude:
4143
- ispr: true
4244
target: ubuntu18.04-arm64
4345
- ispr: true
44-
target: centos7-aarch64
46+
target: rhel7-aarch64
47+
- ispr: true
48+
target: rhel8-aarch64
4549
fail-fast: false
4650

4751
steps:

deployments/container/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ RUN set -eux; \
3535
aarch64 | arm64) ARCH='arm64' ;; \
3636
*) echo "unsupported architecture" ; exit 1 ;; \
3737
esac; \
38-
wget -nv -O - https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \
38+
wget -nv -O - https://dl.google.com/go/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \
3939
| tar -C /usr/local -xz
4040

4141

@@ -117,7 +117,7 @@ RUN rm -f /etc/yum.repos.d/cuda.repo && rm -f /etc/ld.so.conf.d/nvidia.conf
117117
RUN dnf install -y cpio
118118

119119
ARG TARGETARCH
120-
ARG PACKAGE_DIST_RPM=centos7
120+
ARG PACKAGE_DIST_RPM=rhel8
121121

122122
COPY --from=packaging /artifacts/packages/${PACKAGE_DIST_RPM} /rpm-packages
123123

deployments/container/Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ $(IMAGE_TARGETS): image-%: $(ARTIFACTS_ROOT)
9696

9797

9898
PACKAGE_DIST_DEB = ubuntu18.04
99-
# TODO: This needs to be set to centos8 for ppc64le builds
100-
PACKAGE_DIST_RPM = centos7
99+
PACKAGE_DIST_RPM = rhel8
101100

102101
# Handle the default build target.
103102
.PHONY: build push
@@ -116,7 +115,7 @@ $(TEST_TARGETS): test-%:
116115
test-packaging: DIST = packaging
117116
test-packaging:
118117
@echo "Testing package image contents"
119-
@$(DOCKER) run --rm $(IMAGE) test -d "/artifacts/packages/centos7/aarch64" || echo "Missing centos7/aarch64"
120-
@$(DOCKER) run --rm $(IMAGE) test -d "/artifacts/packages/centos7/x86_64" || echo "Missing centos7/x86_64"
118+
@$(DOCKER) run --rm $(IMAGE) test -d "/artifacts/packages/rhel8/aarch64" || echo "Missing rhel8/aarch64"
119+
@$(DOCKER) run --rm $(IMAGE) test -d "/artifacts/packages/rhel8/x86_64" || echo "Missing rhel8/x86_64"
121120
@$(DOCKER) run --rm $(IMAGE) test -d "/artifacts/packages/ubuntu18.04/amd64" || echo "Missing ubuntu18.04/amd64"
122121
@$(DOCKER) run --rm $(IMAGE) test -d "/artifacts/packages/ubuntu18.04/arm64" || echo "Missing ubuntu18.04/arm64"

docker/Dockerfile.debian

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ RUN set -eux; \
2525
aarch64 | arm64) ARCH='arm64' ;; \
2626
*) echo "unsupported architecture" ; exit 1 ;; \
2727
esac; \
28-
wget -nv -O - https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \
28+
wget -nv -O - https://dl.google.com/go/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \
2929
| tar -C /usr/local -xz
3030

3131
ENV GOPATH /go

docker/Dockerfile.opensuse-leap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RUN set -eux; \
1818
aarch64 | arm64) ARCH='arm64' ;; \
1919
*) echo "unsupported architecture"; exit 1 ;; \
2020
esac; \
21-
wget -nv -O - https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \
21+
wget -nv -O - https://dl.google.com/go/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \
2222
| tar -C /usr/local -xz
2323

2424
ENV GOPATH /go
@@ -53,7 +53,7 @@ CMD arch=$(uname -m) && \
5353
-D "_topdir $PWD" \
5454
-D "release_date $(date +'%a %b %d %Y')" \
5555
-D "git_commit ${GIT_COMMIT}" \
56-
-D "version ${PKG_VERS}" \
57-
-D "release ${PKG_REV}" \
56+
-D "_version ${PKG_VERS}" \
57+
-D "_release ${PKG_REV}" \
5858
SPECS/nvidia-container-toolkit.spec && \
5959
mv RPMS/$arch/*.rpm /dist

docker/Dockerfile.rpm-yum

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,16 @@
1717
ARG BASEIMAGE
1818
FROM ${BASEIMAGE}
1919

20-
# centos:stream8 is EOL.
20+
# centos:7 is EOL.
2121
# We switch to the vault repositories for this base image.
22-
ARG BASEIMAGE
23-
RUN sed -i -e "s|mirrorlist=|#mirrorlist=|g" \
22+
ARG OS_VERSION
23+
RUN if [ "${OS_VERSION}" = "7" ]; then \
24+
sed -i -e "s|mirrorlist=|#mirrorlist=|g" \
2425
-e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" \
25-
/etc/yum.repos.d/CentOS-*
26+
/etc/yum.repos.d/CentOS-*; \
27+
else \
28+
true; \
29+
fi
2630

2731
RUN yum install -y \
2832
ca-certificates \
@@ -43,7 +47,7 @@ RUN set -eux; \
4347
aarch64 | arm64) ARCH='arm64' ;; \
4448
*) echo "unsupported architecture"; exit 1 ;; \
4549
esac; \
46-
wget -nv -O - https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \
50+
wget -nv -O - https://dl.google.com/go/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \
4751
| tar -C /usr/local -xz
4852

4953
ENV GOPATH /go
@@ -78,7 +82,7 @@ CMD arch=$(uname -m) && \
7882
-D "_topdir $PWD" \
7983
-D "release_date $(date +'%a %b %d %Y')" \
8084
-D "git_commit ${GIT_COMMIT}" \
81-
-D "version ${PKG_VERS}" \
82-
-D "release ${PKG_REV}" \
85+
-D "_version ${PKG_VERS}" \
86+
-D "_release ${PKG_REV}" \
8387
SPECS/nvidia-container-toolkit.spec && \
8488
mv RPMS/$arch/*.rpm /dist

docker/Dockerfile.ubuntu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ RUN set -eux; \
2323
aarch64 | arm64) ARCH='arm64' ;; \
2424
*) echo "unsupported architecture" ; exit 1 ;; \
2525
esac; \
26-
wget -nv -O - https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \
26+
wget -nv -O - https://dl.google.com/go/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz \
2727
| tar -C /usr/local -xz
2828

2929
ENV GOPATH /go

docker/docker.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ docker-all: $(AMD64_TARGETS) $(X86_64_TARGETS) \
9494
# private centos target
9595
--centos%: OS := centos
9696
--centos%: DOCKERFILE = $(CURDIR)/docker/Dockerfile.rpm-yum
97-
--centos8%: BASEIMAGE = quay.io/centos/centos:stream8
97+
--centos8%: BASEIMAGE = rockylinux/rockylinux:8
9898

9999
# private amazonlinux target
100100
--amazonlinux%: OS := amazonlinux
@@ -109,8 +109,7 @@ docker-all: $(AMD64_TARGETS) $(X86_64_TARGETS) \
109109
--rhel%: VERSION = $(patsubst rhel%-$(ARCH),%,$(TARGET_PLATFORM))
110110
--rhel%: ARTIFACTS_DIR = $(DIST_DIR)/rhel$(VERSION)/$(ARCH)
111111
--rhel%: DOCKERFILE = $(CURDIR)/docker/Dockerfile.rpm-yum
112-
--rhel8%: BASEIMAGE = quay.io/centos/centos:stream8
113-
112+
--rhel8%: BASEIMAGE = rockylinux/rockylinux:8
114113

115114
docker-build-%:
116115
@echo "Building for $(TARGET_PLATFORM)"
@@ -125,6 +124,7 @@ docker-build-%:
125124
--build-arg PKG_VERS="$(PACKAGE_VERSION)" \
126125
--build-arg PKG_REV="$(PACKAGE_REVISION)" \
127126
--build-arg GIT_COMMIT="$(GIT_COMMIT)" \
127+
--build-arg OS_VERSION="$(VERSION)" \
128128
--tag $(BUILDIMAGE) \
129129
--file $(DOCKERFILE) .
130130
$(DOCKER) run \

hack/prepare-artifacts.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ PACKAGE_VERSION=${PACKAGE_VERSION#v}
4949

5050
tar -czvf ${PACKAGE_ROOT}/nvidia-container-toolkit_${VERSION#v}_deb_amd64.tar.gz ${PACKAGE_ROOT}/packages/ubuntu18.04/amd64/*_${PACKAGE_VERSION}-1_amd64.deb
5151
tar -czvf ${PACKAGE_ROOT}/nvidia-container-toolkit_${VERSION#v}_deb_arm64.tar.gz ${PACKAGE_ROOT}/packages/ubuntu18.04/arm64/*_${PACKAGE_VERSION}-1_arm64.deb
52-
tar -czvf ${PACKAGE_ROOT}/nvidia-container-toolkit_${VERSION#v}_rpm_aarch64.tar.gz ${PACKAGE_ROOT}/packages/centos7/aarch64/*-${PACKAGE_VERSION}-1.aarch64.rpm
53-
tar -czvf ${PACKAGE_ROOT}/nvidia-container-toolkit_${VERSION#v}_rpm_x86_64.tar.gz ${PACKAGE_ROOT}/packages/centos7/x86_64/*-${PACKAGE_VERSION}-1.x86_64.rpm
52+
tar -czvf ${PACKAGE_ROOT}/nvidia-container-toolkit_${VERSION#v}_rpm_aarch64.tar.gz ${PACKAGE_ROOT}/packages/rhel*/aarch64/*-${PACKAGE_VERSION}-1.aarch64.rpm
53+
tar -czvf ${PACKAGE_ROOT}/nvidia-container-toolkit_${VERSION#v}_rpm_x86_64.tar.gz ${PACKAGE_ROOT}/packages/rhel*/x86_64/*-${PACKAGE_VERSION}-1.x86_64.rpm
5454

5555
is_command() (
5656
command -v "$1" >/dev/null

packaging/rpm/SPECS/nvidia-container-toolkit.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Name: nvidia-container-toolkit
2-
Version: %{version}
3-
Release: %{release}
2+
Version: %{_version}
3+
Release: %{_release}%{?dist}
44
Group: Development Tools
55

66
Vendor: NVIDIA CORPORATION

0 commit comments

Comments
 (0)