From 52d5021b7615fe853a2b42b7ea9aaa0a7cc2feb7 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Wed, 15 Jun 2022 13:37:02 +0200 Subject: [PATCH 1/7] Bump version to 1.11.0-rc.1 Signed-off-by: Evan Lezar --- versions.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/versions.mk b/versions.mk index 1ced5bc1..d5c8282d 100644 --- a/versions.mk +++ b/versions.mk @@ -13,13 +13,13 @@ # limitations under the License. LIB_NAME := nvidia-container-toolkit -LIB_VERSION := 1.10.0 -LIB_TAG := +LIB_VERSION := 1.11.0 +LIB_TAG := rc.1 # Specify the nvidia-docker2 and nvidia-container-runtime package versions. # Note: The tag is automatically specified to match LIB_TAG. NVIDIA_DOCKER_VERSION := 2.11.0 -NVIDIA_CONTAINER_RUNTIME_VERSION := 3.10.0 +NVIDIA_CONTAINER_RUNTIME_VERSION := 3.11.0 # Specify the expected libnvidia-container0 version for arm64-based ubuntu builds. LIBNVIDIA_CONTAINER0_VERSION := 0.10.0+jetpack From d75f364b2721a73b4447348bf88668335d5b6c6e Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Wed, 15 Jun 2022 13:33:00 +0200 Subject: [PATCH 2/7] Update build scripts to set libnvidia-container version Signed-off-by: Evan Lezar --- scripts/build-all-components.sh | 2 +- scripts/build-packages.sh | 8 ++++---- scripts/get-component-versions.sh | 6 +++++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/build-all-components.sh b/scripts/build-all-components.sh index b3fe5d3c..97407a8b 100755 --- a/scripts/build-all-components.sh +++ b/scripts/build-all-components.sh @@ -25,7 +25,7 @@ function assert_usage() { exit 1 } -set -e -x +set -e SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../scripts && pwd )" PROJECT_ROOT="$( cd ${SCRIPTS_DIR}/.. && pwd )" diff --git a/scripts/build-packages.sh b/scripts/build-packages.sh index 355d635a..ea2a9549 100755 --- a/scripts/build-packages.sh +++ b/scripts/build-packages.sh @@ -19,7 +19,7 @@ # as well as the components included in the third_party folder. # All required packages are generated in the specified dist folder. -set -e -x +set -e SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../scripts && pwd )" PROJECT_ROOT="$( cd ${SCRIPTS_DIR}/.. && pwd )" @@ -61,11 +61,11 @@ fi eval $(${SCRIPTS_DIR}/get-component-versions.sh) -if [[ "${NVIDIA_CONTAINER_TOOLKIT_VERSION}${NVIDIA_CONTAINER_TOOLKIT_TAG:+~${NVIDIA_CONTAINER_TOOLKIT_TAG}}" != "${LIBNVIDIA_CONTAINER_VERSION}" ]]; then +if [[ "${NVIDIA_CONTAINER_TOOLKIT_PACKAGE_VERSION}" != "${LIBNVIDIA_CONTAINER_PACKAGE_VERSION}" ]]; then set +x echo "The libnvidia-container and nvidia-container-toolkit versions do not match." - echo "lib: '${LIBNVIDIA_CONTAINER_VERSION}'" - echo "toolkit: '${NVIDIA_CONTAINER_TOOLKIT_VERSION}${NVIDIA_CONTAINER_TOOLKIT_TAG:+~${NVIDIA_CONTAINER_TOOLKIT_TAG}}'" + echo "lib: '${LIBNVIDIA_CONTAINER_PACKAGE_VERSION}'" + echo "toolkit: '${NVIDIA_CONTAINER_TOOLKIT_PACKAGE_VERSION}'" set -x [[ ${ALLOW_VERSION_MISMATCH} == "true" ]] || exit 1 fi diff --git a/scripts/get-component-versions.sh b/scripts/get-component-versions.sh index 80e34a51..e70f9181 100755 --- a/scripts/get-component-versions.sh +++ b/scripts/get-component-versions.sh @@ -36,6 +36,9 @@ NVIDIA_DOCKER_ROOT=${PROJECT_ROOT}/third_party/nvidia-docker # Get version for libnvidia-container libnvidia_container_version_tag=$(grep "#define NVC_VERSION" ${LIBNVIDIA_CONTAINER_ROOT}/src/nvc.h \ | sed -e 's/#define NVC_VERSION[[:space:]]"\(.*\)"/\1/') +libnvidia_container_version=${libnvidia_container_version_tag%%~*} +libnvidia_container_tag=${libnvidia_container_version_tag##${libnvidia_container_version}} +libnvidia_container_tag=${libnvidia_container_tag##~} versions_makefile=${NVIDIA_CONTAINER_TOOLKIT_ROOT}/versions.mk # Get version for nvidia-container-toolit @@ -53,7 +56,8 @@ nvidia_docker_version=$(grep -m 1 "^NVIDIA_DOCKER_VERSION := " ${versions_makefi nvidia_docker_tag=${nvidia_container_toolkit_tag} nvidia_docker_version_tag="${nvidia_docker_version}${nvidia_docker_tag:+~${nvidia_docker_tag}}" -echo "LIBNVIDIA_CONTAINER_VERSION=${libnvidia_container_version_tag}" +echo "LIBNVIDIA_CONTAINER_VERSION=${libnvidia_container_version}" +echo "LIBNVIDIA_CONTAINER_TAG=${libnvidia_container_tag}" echo "LIBNVIDIA_CONTAINER_PACKAGE_VERSION=${libnvidia_container_version_tag//\~/-}" echo "NVIDIA_CONTAINER_TOOLKIT_VERSION=${nvidia_container_toolkit_version}" echo "NVIDIA_CONTAINER_TOOLKIT_TAG=${nvidia_container_toolkit_tag}" From 278fa433034f7a7c24d65ae7bd1302581b82270b Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Mon, 13 Jun 2022 15:41:35 +0200 Subject: [PATCH 3/7] Allow libnvidia-container1 version to be specified directly Signed-off-by: Evan Lezar --- docker/Dockerfile.amazonlinux | 5 ++++- docker/Dockerfile.centos | 5 ++++- docker/Dockerfile.debian | 7 +++++-- docker/Dockerfile.opensuse-leap | 5 ++++- docker/Dockerfile.ubuntu | 7 +++++-- docker/docker.mk | 10 ++++++++++ packaging/debian/control | 2 +- packaging/debian/prepare | 2 +- packaging/rpm/SPECS/nvidia-container-toolkit.spec | 4 ++-- scripts/build-all-components.sh | 11 +++++++---- scripts/build-packages.sh | 9 +++++++++ 11 files changed, 52 insertions(+), 15 deletions(-) diff --git a/docker/Dockerfile.amazonlinux b/docker/Dockerfile.amazonlinux index cd1e2c86..6fd00c1e 100644 --- a/docker/Dockerfile.amazonlinux +++ b/docker/Dockerfile.amazonlinux @@ -61,13 +61,16 @@ COPY oci-nvidia-hook.json $DIST_DIR/oci-nvidia-hook.json WORKDIR $DIST_DIR/.. COPY packaging/rpm . +ARG LIBNVIDIA_CONTAINER_TOOLS_VERSION +ENV LIBNVIDIA_CONTAINER_TOOLS_VERSION ${LIBNVIDIA_CONTAINER_TOOLS_VERSION} + CMD arch=$(uname -m) && \ rpmbuild --clean --target=$arch -bb \ -D "_topdir $PWD" \ -D "release_date $(date +'%a %b %d %Y')" \ -D "git_commit ${GIT_COMMIT}" \ -D "version $VERSION" \ - -D "libnvidia_container_version ${VERSION}-${RELEASE}" \ + -D "libnvidia_container_tools_version ${LIBNVIDIA_CONTAINER_TOOLS_VERSION}" \ -D "release $RELEASE" \ SPECS/nvidia-container-toolkit.spec && \ mv RPMS/$arch/*.rpm /dist diff --git a/docker/Dockerfile.centos b/docker/Dockerfile.centos index 0c8befe2..a64409d9 100644 --- a/docker/Dockerfile.centos +++ b/docker/Dockerfile.centos @@ -59,13 +59,16 @@ COPY oci-nvidia-hook.json $DIST_DIR/oci-nvidia-hook.json WORKDIR $DIST_DIR/.. COPY packaging/rpm . +ARG LIBNVIDIA_CONTAINER_TOOLS_VERSION +ENV LIBNVIDIA_CONTAINER_TOOLS_VERSION ${LIBNVIDIA_CONTAINER_TOOLS_VERSION} + CMD arch=$(uname -m) && \ rpmbuild --clean --target=$arch -bb \ -D "_topdir $PWD" \ -D "release_date $(date +'%a %b %d %Y')" \ -D "git_commit ${GIT_COMMIT}" \ -D "version $VERSION" \ - -D "libnvidia_container_version ${VERSION}-${RELEASE}" \ + -D "libnvidia_container_tools_version ${LIBNVIDIA_CONTAINER_TOOLS_VERSION}" \ -D "release $RELEASE" \ SPECS/nvidia-container-toolkit.spec && \ mv RPMS/$arch/*.rpm /dist diff --git a/docker/Dockerfile.debian b/docker/Dockerfile.debian index 2fbbda2d..8e0c099e 100644 --- a/docker/Dockerfile.debian +++ b/docker/Dockerfile.debian @@ -65,14 +65,17 @@ RUN if [ "$(lsb_release -cs)" = "jessie" ]; then \ WORKDIR $DIST_DIR COPY packaging/debian ./debian +ARG LIBNVIDIA_CONTAINER_TOOLS_VERSION +ENV LIBNVIDIA_CONTAINER_TOOLS_VERSION ${LIBNVIDIA_CONTAINER_TOOLS_VERSION} + RUN dch --create --package="${PKG_NAME}" \ --newversion "${REVISION}" \ "See https://gitlab.com/nvidia/container-toolkit/container-toolkit/-/blob/${GIT_COMMIT}/CHANGELOG.md for the changelog" && \ - dch --append "Bump libnvidia-container dependency to ${REVISION}" && \ + dch --append "Bump libnvidia-container dependency to ${LIBNVIDIA_CONTAINER1_VERSION}" && \ dch -r "" && \ if [ "$REVISION" != "$(dpkg-parsechangelog --show-field=Version)" ]; then exit 1; fi CMD export DISTRIB="$(lsb_release -cs)" && \ - debuild -eDISTRIB -eSECTION -eLIBNVIDIA_CONTAINER_VERSION="${REVISION}" \ + debuild -eDISTRIB -eSECTION -eLIBNVIDIA_CONTAINER_TOOLS_VERSION \ --dpkg-buildpackage-hook='sh debian/prepare' -i -us -uc -b && \ mv /tmp/nvidia-container-toolkit_*.deb /dist diff --git a/docker/Dockerfile.opensuse-leap b/docker/Dockerfile.opensuse-leap index d00a9714..5d1d3acb 100644 --- a/docker/Dockerfile.opensuse-leap +++ b/docker/Dockerfile.opensuse-leap @@ -57,13 +57,16 @@ COPY config/config.toml.${CONFIG_TOML_SUFFIX} $DIST_DIR/config.toml WORKDIR $DIST_DIR/.. COPY packaging/rpm . +ARG LIBNVIDIA_CONTAINER_TOOLS_VERSION +ENV LIBNVIDIA_CONTAINER_TOOLS_VERSION ${LIBNVIDIA_CONTAINER_TOOLS_VERSION} + CMD arch=$(uname -m) && \ rpmbuild --clean --target=$arch -bb \ -D "_topdir $PWD" \ -D "release_date $(date +'%a %b %d %Y')" \ -D "git_commit ${GIT_COMMIT}" \ -D "version $VERSION" \ - -D "libnvidia_container_version ${VERSION}-${RELEASE}" \ + -D "libnvidia_container_tools_version ${LIBNVIDIA_CONTAINER_TOOLS_VERSION}" \ -D "release $RELEASE" \ SPECS/nvidia-container-toolkit.spec && \ mv RPMS/$arch/*.rpm /dist diff --git a/docker/Dockerfile.ubuntu b/docker/Dockerfile.ubuntu index 53845d2c..dcd71c21 100644 --- a/docker/Dockerfile.ubuntu +++ b/docker/Dockerfile.ubuntu @@ -58,14 +58,17 @@ COPY config/config.toml.${CONFIG_TOML_SUFFIX} $DIST_DIR/config.toml WORKDIR $DIST_DIR COPY packaging/debian ./debian +ARG LIBNVIDIA_CONTAINER_TOOLS_VERSION +ENV LIBNVIDIA_CONTAINER_TOOLS_VERSION ${LIBNVIDIA_CONTAINER_TOOLS_VERSION} + RUN dch --create --package="${PKG_NAME}" \ --newversion "${REVISION}" \ "See https://gitlab.com/nvidia/container-toolkit/container-toolkit/-/blob/${GIT_COMMIT}/CHANGELOG.md for the changelog" && \ - dch --append "Bump libnvidia-container dependency to ${REVISION}" && \ + dch --append "Bump libnvidia-container dependency to ${LIBNVIDIA_CONTAINER_TOOLS_VERSION}" && \ dch -r "" && \ if [ "$REVISION" != "$(dpkg-parsechangelog --show-field=Version)" ]; then exit 1; fi CMD export DISTRIB="$(lsb_release -cs)" && \ - debuild -eDISTRIB -eSECTION -eLIBNVIDIA_CONTAINER_VERSION="${REVISION}" \ + debuild -eDISTRIB -eSECTION -eLIBNVIDIA_CONTAINER_TOOLS_VERSION \ --dpkg-buildpackage-hook='sh debian/prepare' -i -us -uc -b && \ mv /tmp/*.deb /dist diff --git a/docker/docker.mk b/docker/docker.mk index a22a504c..a1ec9d02 100644 --- a/docker/docker.mk +++ b/docker/docker.mk @@ -85,32 +85,41 @@ docker-all: $(AMD64_TARGETS) $(X86_64_TARGETS) \ --%: docker-build-% @ +LIBNVIDIA_CONTAINER_VERSION ?= $(LIB_VERSION) +LIBNVIDIA_CONTAINER_TAG ?= $(LIB_TAG) + # private ubuntu target --ubuntu%: OS := ubuntu --ubuntu%: LIB_VERSION := $(LIB_VERSION)$(if $(LIB_TAG),~$(LIB_TAG)) +--ubuntu%: LIBNVIDIA_CONTAINER_TOOLS_VERSION := $(LIBNVIDIA_CONTAINER_VERSION)$(if $(LIBNVIDIA_CONTAINER_TAG),~$(LIBNVIDIA_CONTAINER_TAG))-1 --ubuntu%: PKG_REV := 1 # private debian target --debian%: OS := debian --debian%: LIB_VERSION := $(LIB_VERSION)$(if $(LIB_TAG),~$(LIB_TAG)) +--debian%: LIBNVIDIA_CONTAINER_TOOLS_VERSION := $(LIBNVIDIA_CONTAINER_VERSION)$(if $(LIBNVIDIA_CONTAINER_TAG),~$(LIBNVIDIA_CONTAINER_TAG))-1 --debian%: PKG_REV := 1 # private centos target --centos%: OS := centos --centos%: PKG_REV := $(if $(LIB_TAG),0.1.$(LIB_TAG),1) +--centos%: LIBNVIDIA_CONTAINER_TOOLS_VERSION := $(LIBNVIDIA_CONTAINER_VERSION)-$(if $(LIBNVIDIA_CONTAINER_TAG),0.1.$(LIBNVIDIA_CONTAINER_TAG),1) --centos8%: BASEIMAGE = quay.io/centos/centos:stream8 # private amazonlinux target --amazonlinux%: OS := amazonlinux +--amazonlinux%: LIBNVIDIA_CONTAINER_TOOLS_VERSION := $(LIBNVIDIA_CONTAINER_VERSION)-$(if $(LIBNVIDIA_CONTAINER_TAG),0.1.$(LIBNVIDIA_CONTAINER_TAG),1) --amazonlinux%: PKG_REV := $(if $(LIB_TAG),0.1.$(LIB_TAG),1) # private opensuse-leap target --opensuse-leap%: OS = opensuse-leap --opensuse-leap%: BASEIMAGE = opensuse/leap:$(VERSION) +--opensuse-leap%: LIBNVIDIA_CONTAINER_TOOLS_VERSION := $(LIBNVIDIA_CONTAINER_VERSION)-$(if $(LIBNVIDIA_CONTAINER_TAG),0.1.$(LIBNVIDIA_CONTAINER_TAG),1) --opensuse-leap%: PKG_REV := $(if $(LIB_TAG),0.1.$(LIB_TAG),1) # private rhel target (actually built on centos) --rhel%: OS := centos +--rhel%: LIBNVIDIA_CONTAINER_TOOLS_VERSION := $(LIBNVIDIA_CONTAINER_VERSION)-$(if $(LIBNVIDIA_CONTAINER_TAG),0.1.$(LIBNVIDIA_CONTAINER_TAG),1) --rhel%: PKG_REV := $(if $(LIB_TAG),0.1.$(LIB_TAG),1) --rhel%: VERSION = $(patsubst rhel%-$(ARCH),%,$(TARGET_PLATFORM)) --rhel%: ARTIFACTS_DIR = $(DIST_DIR)/rhel$(VERSION)/$(ARCH) @@ -131,6 +140,7 @@ docker-build-%: --build-arg PKG_NAME="$(LIB_NAME)" \ --build-arg PKG_VERS="$(LIB_VERSION)" \ --build-arg PKG_REV="$(PKG_REV)" \ + --build-arg LIBNVIDIA_CONTAINER_TOOLS_VERSION="$(LIBNVIDIA_CONTAINER_TOOLS_VERSION)" \ --build-arg CONFIG_TOML_SUFFIX="$(CONFIG_TOML_SUFFIX)" \ --build-arg GIT_COMMIT="$(GIT_COMMIT)" \ --tag $(BUILDIMAGE) \ diff --git a/packaging/debian/control b/packaging/debian/control index f21c42e7..22d9d8fd 100644 --- a/packaging/debian/control +++ b/packaging/debian/control @@ -10,7 +10,7 @@ Build-Depends: debhelper (>= 9) Package: nvidia-container-toolkit Architecture: any -Depends: ${misc:Depends}, libnvidia-container-tools (>= @LIBNVIDIA_CONTAINER_VERSION@), libnvidia-container-tools (<< 2.0.0), libseccomp2 +Depends: ${misc:Depends}, libnvidia-container-tools (>= @LIBNVIDIA_CONTAINER_TOOLS_VERSION@), libnvidia-container-tools (<< 2.0.0), libseccomp2 Breaks: nvidia-container-runtime (<= 3.5.0-1), nvidia-container-runtime-hook Replaces: nvidia-container-runtime (<= 3.5.0-1), nvidia-container-runtime-hook Description: NVIDIA container runtime hook diff --git a/packaging/debian/prepare b/packaging/debian/prepare index edff676a..4dc5085d 100755 --- a/packaging/debian/prepare +++ b/packaging/debian/prepare @@ -3,7 +3,7 @@ set -e sed -i "s;@SECTION@;${SECTION:+$SECTION/};g" debian/control -sed -i "s;@LIBNVIDIA_CONTAINER_VERSION@;${LIBNVIDIA_CONTAINER_VERSION:+$LIBNVIDIA_CONTAINER_VERSION};g" debian/control +sed -i "s;@LIBNVIDIA_CONTAINER_TOOLS_VERSION@;${LIBNVIDIA_CONTAINER_TOOLS_VERSION:+$LIBNVIDIA_CONTAINER_TOOLS_VERSION};g" debian/control if [ -n "$DISTRIB" ]; then sed -i "s;UNRELEASED;$DISTRIB;" debian/changelog diff --git a/packaging/rpm/SPECS/nvidia-container-toolkit.spec b/packaging/rpm/SPECS/nvidia-container-toolkit.spec index e2f68fb1..3f682bde 100644 --- a/packaging/rpm/SPECS/nvidia-container-toolkit.spec +++ b/packaging/rpm/SPECS/nvidia-container-toolkit.spec @@ -21,7 +21,7 @@ Source6: LICENSE Obsoletes: nvidia-container-runtime <= 3.5.0-1, nvidia-container-runtime-hook Provides: nvidia-container-runtime Provides: nvidia-container-runtime-hook -Requires: libnvidia-container-tools >= %{libnvidia_container_version}, libnvidia-container-tools < 2.0.0 +Requires: libnvidia-container-tools >= %{libnvidia_container_tools_version}, libnvidia-container-tools < 2.0.0 %if 0%{?suse_version} Requires: libseccomp2 @@ -70,4 +70,4 @@ rm -f %{_bindir}/nvidia-container-runtime-hook # As of 1.10.0-1 we generate the release information automatically * %{release_date} NVIDIA CORPORATION %{version}-%{release} - See https://gitlab.com/nvidia/container-toolkit/container-toolkit/-/blob/%{git_commit}/CHANGELOG.md -- Bump libnvidia-container dependency to libnvidia-container-tools >= %{libnvidia_container_version} +- Bump libnvidia-container dependency to libnvidia-container-tools >= %{libnvidia_container_tools_version} diff --git a/scripts/build-all-components.sh b/scripts/build-all-components.sh index 97407a8b..81f3c2be 100755 --- a/scripts/build-all-components.sh +++ b/scripts/build-all-components.sh @@ -52,13 +52,16 @@ ${SCRIPTS_DIR}/get-component-versions.sh # Build libnvidia-container make -C ${LIBNVIDIA_CONTAINER_ROOT} -f mk/docker.mk ${TARGET} -# Build nvidia-container-toolkit -make -C ${NVIDIA_CONTAINER_TOOLKIT_ROOT} ${TARGET} - -if [[ -z ${NVIDIA_CONTAINER_TOOLKIT_VERSION} ]]; then +if [[ -z ${NVIDIA_CONTAINER_TOOLKIT_VERSION} || -z ${LIBNVIDIA_CONTAINER_VERSION} ]]; then eval $(${SCRIPTS_DIR}/get-component-versions.sh) fi +# Build nvidia-container-toolkit +make -C ${NVIDIA_CONTAINER_TOOLKIT_ROOT} \ + LIBNVIDIA_CONTAINER_VERSION="${LIBNVIDIA_CONTAINER_VERSION}" \ + LIBNVIDIA_CONTAINER_TAG="${LIBNVIDIA_CONTAINER_TAG}" \ + ${TARGET} + # We set the TOOLKIT_VERSION, TOOLKIT_TAG for the nvidia-container-runtime and nvidia-docker targets # The LIB_TAG is also overridden to match the TOOLKIT_TAG. # Build nvidia-container-runtime diff --git a/scripts/build-packages.sh b/scripts/build-packages.sh index ea2a9549..9d64fece 100755 --- a/scripts/build-packages.sh +++ b/scripts/build-packages.sh @@ -61,6 +61,12 @@ fi eval $(${SCRIPTS_DIR}/get-component-versions.sh) + +if [[ -n ${NVIDIA_CONTAINER_TOOLKIT_TAG} ]]; then +echo "Allowing mismatched versions for release candidate " +: ${ALLOW_VERSION_MISMATCH:=true} +fi + if [[ "${NVIDIA_CONTAINER_TOOLKIT_PACKAGE_VERSION}" != "${LIBNVIDIA_CONTAINER_PACKAGE_VERSION}" ]]; then set +x echo "The libnvidia-container and nvidia-container-toolkit versions do not match." @@ -68,10 +74,13 @@ if [[ "${NVIDIA_CONTAINER_TOOLKIT_PACKAGE_VERSION}" != "${LIBNVIDIA_CONTAINER_PA echo "toolkit: '${NVIDIA_CONTAINER_TOOLKIT_PACKAGE_VERSION}'" set -x [[ ${ALLOW_VERSION_MISMATCH} == "true" ]] || exit 1 + echo "Continuing with mismatched version" fi export NVIDIA_CONTAINER_TOOLKIT_VERSION export NVIDIA_CONTAINER_TOOLKIT_TAG +export LIBNVIDIA_CONTAINER_VERSION +export LIBNVIDIA_CONTAINER_TAG export NVIDIA_CONTAINER_RUNTIME_VERSION export NVIDIA_DOCKER_VERSION From a1319b17868a0d5db79f587d0cc5334cfec2b45c Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Thu, 16 Jun 2022 13:44:14 +0200 Subject: [PATCH 4/7] Switch to latest docker and docker dind in CI This change prevents errors when downloading ubuntu repos on amd64 architectures. The `stable` images were last pushed 2 years ago. Signed-off-by: Evan Lezar --- .common-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.common-ci.yml b/.common-ci.yml index e9ab8ef5..44675bd6 100644 --- a/.common-ci.yml +++ b/.common-ci.yml @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. default: - image: docker:stable + image: docker services: - - name: docker:stable-dind + - name: docker:dind command: ["--experimental"] variables: From 8b729475e21ffcca8f3c3ae2e41ce43bee746734 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Thu, 16 Jun 2022 14:57:30 +0200 Subject: [PATCH 5/7] Allow any 1.* version of libnvidia-container package Signed-off-by: Evan Lezar --- build/container/Dockerfile.centos | 4 ++-- build/container/Dockerfile.ubuntu | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/container/Dockerfile.centos b/build/container/Dockerfile.centos index 34485d6a..f5ed92ca 100644 --- a/build/container/Dockerfile.centos +++ b/build/container/Dockerfile.centos @@ -67,8 +67,8 @@ ARG TARGETARCH ENV PACKAGE_ARCH ${TARGETARCH} RUN PACKAGE_ARCH=${PACKAGE_ARCH/amd64/x86_64} && PACKAGE_ARCH=${PACKAGE_ARCH/arm64/aarch64} && \ yum localinstall -y \ - ${PACKAGE_DIST}/${PACKAGE_ARCH}/libnvidia-container1-${PACKAGE_VERSION}*.rpm \ - ${PACKAGE_DIST}/${PACKAGE_ARCH}/libnvidia-container-tools-${PACKAGE_VERSION}*.rpm \ + ${PACKAGE_DIST}/${PACKAGE_ARCH}/libnvidia-container1-1.*.rpm \ + ${PACKAGE_DIST}/${PACKAGE_ARCH}/libnvidia-container-tools-1.*.rpm \ ${PACKAGE_DIST}/${PACKAGE_ARCH}/nvidia-container-toolkit-${PACKAGE_VERSION}*.rpm WORKDIR /work diff --git a/build/container/Dockerfile.ubuntu b/build/container/Dockerfile.ubuntu index 53f0b692..f4014e61 100644 --- a/build/container/Dockerfile.ubuntu +++ b/build/container/Dockerfile.ubuntu @@ -75,8 +75,8 @@ RUN if [ "${PACKAGE_ARCH}" = "arm64" ]; then \ fi RUN dpkg -i \ - ${PACKAGE_DIST}/${PACKAGE_ARCH}/libnvidia-container1_${PACKAGE_VERSION}*.deb \ - ${PACKAGE_DIST}/${PACKAGE_ARCH}/libnvidia-container-tools_${PACKAGE_VERSION}*.deb \ + ${PACKAGE_DIST}/${PACKAGE_ARCH}/libnvidia-container1_1.*.deb \ + ${PACKAGE_DIST}/${PACKAGE_ARCH}/libnvidia-container-tools_1.*.deb \ ${PACKAGE_DIST}/${PACKAGE_ARCH}/nvidia-container-toolkit_${PACKAGE_VERSION}*.deb WORKDIR /work From 4b0e79be50f8a1cc15824cef3605b0414b667b36 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Fri, 17 Jun 2022 11:32:39 +0200 Subject: [PATCH 6/7] Update nvidia-docker and nvidia-container-runtime branches to main Signed-off-by: Evan Lezar --- .gitmodules | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitmodules b/.gitmodules index 3fc245e1..c3c7d63e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,6 +5,8 @@ [submodule "third_party/nvidia-container-runtime"] path = third_party/nvidia-container-runtime url = https://gitlab.com/nvidia/container-toolkit/container-runtime.git + branch = main [submodule "third_party/nvidia-docker"] path = third_party/nvidia-docker url = https://gitlab.com/nvidia/container-toolkit/nvidia-docker.git + branch = main From 02f0ee08fc0482d98b938006b47f1b257347b0cd Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Fri, 17 Jun 2022 11:58:06 +0200 Subject: [PATCH 7/7] Update nvidia-docker and nvidia-container-runtime Signed-off-by: Evan Lezar --- third_party/nvidia-container-runtime | 2 +- third_party/nvidia-docker | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/nvidia-container-runtime b/third_party/nvidia-container-runtime index c3d7d114..d2bb9d0a 160000 --- a/third_party/nvidia-container-runtime +++ b/third_party/nvidia-container-runtime @@ -1 +1 @@ -Subproject commit c3d7d114d507e9b7ebfe9fc387a152be6ccaeea9 +Subproject commit d2bb9d0afee2fc2be545a97b0fcda9bf553a1b29 diff --git a/third_party/nvidia-docker b/third_party/nvidia-docker index 178cec60..0c082f6e 160000 --- a/third_party/nvidia-docker +++ b/third_party/nvidia-docker @@ -1 +1 @@ -Subproject commit 178cec600ce52270f4b9d22326ba1fde218dba39 +Subproject commit 0c082f6e75ee7a02d85778d115c3b96c4d46f0d8