From 72d1d90ce946a6e343a35a4bb55e82cac3ed0571 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Mon, 29 Nov 2021 10:13:27 +0100 Subject: [PATCH 1/5] Bump post 1.7.0-rc.1 release Signed-off-by: Evan Lezar --- Makefile | 2 +- build/container/Makefile | 2 +- packaging/debian/changelog | 4 ++++ packaging/rpm/SPECS/nvidia-container-toolkit.spec | 3 +++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d0015246..5a597417 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ DIST_DIR ?= $(CURDIR)/dist LIB_NAME := nvidia-container-toolkit LIB_VERSION := 1.7.0 -LIB_TAG := rc.1 +LIB_TAG := rc.2 GOLANG_VERSION := 1.16.3 MODULE := github.com/NVIDIA/nvidia-container-toolkit diff --git a/build/container/Makefile b/build/container/Makefile index c0b62a2a..e685b9a0 100644 --- a/build/container/Makefile +++ b/build/container/Makefile @@ -21,7 +21,7 @@ DIST_DIR ?= $(CURDIR)/dist # TODO: These should be defined ONCE and currently duplicate the version in the # toolkit makefile. LIB_VERSION := 1.7.0 -LIB_TAG := rc.1 +LIB_TAG := rc.2 VERSION ?= $(LIB_VERSION)$(if $(LIB_TAG),-$(LIB_TAG)) diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 68677466..f524b8c4 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,7 @@ +nvidia-container-toolkit (1.7.0~rc.2-1) experimental; urgency=medium + + -- NVIDIA CORPORATION Mon, 29 Nov 2021 10:06:53 +0100 + nvidia-container-toolkit (1.7.0~rc.1-1) experimental; urgency=medium * Specify containerd runtime type as string in config tools to remove dependency on containerd package diff --git a/packaging/rpm/SPECS/nvidia-container-toolkit.spec b/packaging/rpm/SPECS/nvidia-container-toolkit.spec index ed7368de..0cbd2675 100644 --- a/packaging/rpm/SPECS/nvidia-container-toolkit.spec +++ b/packaging/rpm/SPECS/nvidia-container-toolkit.spec @@ -64,6 +64,9 @@ rm -f %{_bindir}/nvidia-container-runtime-hook /usr/share/containers/oci/hooks.d/oci-nvidia-hook.json %changelog +* Mon Nov 29 2021 NVIDIA CORPORATION 1.7.0-0.1.rc.2 +- [Placeholder] + * Thu Nov 25 2021 NVIDIA CORPORATION 1.7.0-0.1.rc.1 - Specify containerd runtime type as string in config tools to remove dependency on containerd package - Add supported-driver-capabilities config option to allow for a subset of all driver capabilities to be specified From 27bb5cca0cb7ec9f1fc299678876f3285e146e48 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Mon, 29 Nov 2021 10:15:29 +0100 Subject: [PATCH 2/5] Specify nvidia-container-runtime and nvidia-docker versions Signed-off-by: Evan Lezar --- Makefile | 4 ++++ scripts/build-all-components.sh | 2 ++ scripts/get-component-versions.sh | 17 ++++++++--------- scripts/release.sh | 2 ++ 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 5a597417..04aea7ee 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,10 @@ LIB_NAME := nvidia-container-toolkit LIB_VERSION := 1.7.0 LIB_TAG := rc.2 +# Specify the nvidia-docker2 and nvidia-container-runtime package versions +NVIDIA_DOCKER_VERSION := 2.8.0 +NVIDIA_CONTAINER_RUNTIME_VERSION := 3.6.0 + GOLANG_VERSION := 1.16.3 MODULE := github.com/NVIDIA/nvidia-container-toolkit diff --git a/scripts/build-all-components.sh b/scripts/build-all-components.sh index a8400f8f..b3fe5d3c 100755 --- a/scripts/build-all-components.sh +++ b/scripts/build-all-components.sh @@ -63,6 +63,7 @@ fi # The LIB_TAG is also overridden to match the TOOLKIT_TAG. # Build nvidia-container-runtime make -C ${NVIDIA_CONTAINER_RUNTIME_ROOT} \ + LIB_VERSION="${NVIDIA_CONTAINER_RUNTIME_VERSION}" \ LIB_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \ TOOLKIT_VERSION="${NVIDIA_CONTAINER_TOOLKIT_VERSION}" \ TOOLKIT_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \ @@ -70,6 +71,7 @@ make -C ${NVIDIA_CONTAINER_RUNTIME_ROOT} \ # Build nvidia-docker2 make -C ${NVIDIA_DOCKER_ROOT} \ + LIB_VERSION="${NVIDIA_DOCKER_VERSION}" \ LIB_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \ TOOLKIT_VERSION="${NVIDIA_CONTAINER_TOOLKIT_VERSION}" \ TOOLKIT_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \ diff --git a/scripts/get-component-versions.sh b/scripts/get-component-versions.sh index 268f8551..b1ef6c52 100755 --- a/scripts/get-component-versions.sh +++ b/scripts/get-component-versions.sh @@ -28,10 +28,10 @@ set -e SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../scripts && pwd )" PROJECT_ROOT="$( cd ${SCRIPTS_DIR}/.. && pwd )" -: ${LIBNVIDIA_CONTAINER_ROOT:=${PROJECT_ROOT}/third_party/libnvidia-container} -: ${NVIDIA_CONTAINER_TOOLKIT_ROOT:=${PROJECT_ROOT}} -: ${NVIDIA_CONTAINER_RUNTIME_ROOT:=${PROJECT_ROOT}/third_party/nvidia-container-runtime} -: ${NVIDIA_DOCKER_ROOT:=${PROJECT_ROOT}/third_party/nvidia-docker} +LIBNVIDIA_CONTAINER_ROOT=${PROJECT_ROOT}/third_party/libnvidia-container +NVIDIA_CONTAINER_TOOLKIT_ROOT=${PROJECT_ROOT} +NVIDIA_CONTAINER_RUNTIME_ROOT=${PROJECT_ROOT}/third_party/nvidia-container-runtime +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 \ @@ -43,16 +43,15 @@ nvidia_container_toolkit_tag=$(grep -m 1 "^LIB_TAG .= " ${NVIDIA_CONTAINER_TOOLK nvidia_container_toolkit_version_tag="${nvidia_container_toolkit_version}${nvidia_container_toolkit_tag:+~${nvidia_container_toolkit_tag}}" # Get version for nvidia-container-runtime -nvidia_container_runtime_version=$(grep -m 1 "^LIB_VERSION := " ${NVIDIA_CONTAINER_RUNTIME_ROOT}/Makefile | sed -e 's/LIB_VERSION :=[[:space:]]\(.*\)[[:space:]]*/\1/') -nvidia_container_runtime_tag=$(grep -m 1 "^LIB_TAG .= " ${NVIDIA_CONTAINER_RUNTIME_ROOT}/Makefile | sed -e 's/LIB_TAG .=[[:space:]]\(.*\)[[:space:]]*/\1/') +nvidia_container_runtime_version=$(grep -m 1 "^NVIDIA_CONTAINER_RUNTIME_VERSION := " ${NVIDIA_CONTAINER_TOOLKIT_ROOT}/Makefile | sed -e 's/NVIDIA_CONTAINER_RUNTIME_VERSION :=[[:space:]]\(.*\)[[:space:]]*/\1/') +nvidia_container_runtime_tag=${nvidia_container_toolkit_tag} nvidia_container_runtime_version_tag="${nvidia_container_runtime_version}${nvidia_container_runtime_tag:+~${nvidia_container_runtime_tag}}" # Get version for nvidia-docker -nvidia_docker_version=$(grep -m 1 "^LIB_VERSION := " ${NVIDIA_DOCKER_ROOT}/Makefile | sed -e 's/LIB_VERSION :=[[:space:]]\(.*\)[[:space:]]*/\1/') -nvidia_docker_tag=$(grep -m 1 "^LIB_TAG .= " ${NVIDIA_DOCKER_ROOT}/Makefile | sed -e 's/LIB_TAG .=[[:space:]]\(.*\)[[:space:]]*/\1/') +nvidia_docker_version=$(grep -m 1 "^NVIDIA_DOCKER_VERSION := " ${NVIDIA_CONTAINER_TOOLKIT_ROOT}/Makefile | sed -e 's/NVIDIA_DOCKER_VERSION :=[[:space:]]\(.*\)[[:space:]]*/\1/') +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 "NVIDIA_CONTAINER_TOOLKIT_VERSION=${nvidia_container_toolkit_version}" echo "NVIDIA_CONTAINER_TOOLKIT_TAG=${nvidia_container_toolkit_tag}" diff --git a/scripts/release.sh b/scripts/release.sh index e436d899..5b0e74ee 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -55,6 +55,8 @@ fi eval $(${SCRIPTS_DIR}/get-component-versions.sh) export NVIDIA_CONTAINER_TOOLKIT_VERSION export NVIDIA_CONTAINER_TOOLKIT_TAG +export NVIDIA_CONTAINER_RUNTIME_VERSION +export NVIDIA_DOCKER_VERSION for target in ${targets[@]}; do ${SCRIPTS_DIR}/build-all-components.sh ${target} From b0d6948d9423ff58b267bdbe119abea66beab2c4 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Mon, 29 Nov 2021 14:35:41 +0100 Subject: [PATCH 3/5] Add versions.mk file to define versions Signed-off-by: Evan Lezar --- Makefile | 9 +-------- build/container/Makefile | 13 ++++--------- scripts/get-component-versions.sh | 9 +++++---- versions.mk | 24 ++++++++++++++++++++++++ 4 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 versions.mk diff --git a/Makefile b/Makefile index 04aea7ee..5e517cdb 100644 --- a/Makefile +++ b/Makefile @@ -16,15 +16,8 @@ DOCKER ?= docker MKDIR ?= mkdir DIST_DIR ?= $(CURDIR)/dist -LIB_NAME := nvidia-container-toolkit -LIB_VERSION := 1.7.0 -LIB_TAG := rc.2 +include $(CURDIR)/versions.mk -# Specify the nvidia-docker2 and nvidia-container-runtime package versions -NVIDIA_DOCKER_VERSION := 2.8.0 -NVIDIA_CONTAINER_RUNTIME_VERSION := 3.6.0 - -GOLANG_VERSION := 1.16.3 MODULE := github.com/NVIDIA/nvidia-container-toolkit # By default run all native docker-based targets diff --git a/build/container/Makefile b/build/container/Makefile index e685b9a0..bb87d3c8 100644 --- a/build/container/Makefile +++ b/build/container/Makefile @@ -17,21 +17,16 @@ MKDIR ?= mkdir DIST_DIR ?= $(CURDIR)/dist ##### Global variables ##### +include $(CURDIR)/versions.mk -# TODO: These should be defined ONCE and currently duplicate the version in the -# toolkit makefile. -LIB_VERSION := 1.7.0 -LIB_TAG := rc.2 - -VERSION ?= $(LIB_VERSION)$(if $(LIB_TAG),-$(LIB_TAG)) - -CUDA_VERSION ?= 11.4.2 -GOLANG_VERSION ?= 1.16.4 +GOLANG_VERSION := 1.16.4 ifeq ($(IMAGE_NAME),) REGISTRY ?= nvidia IMAGE_NAME := $(REGISTRY)/container-toolkit endif +VERSION ?= $(LIB_VERSION)$(if $(LIB_TAG),-$(LIB_TAG)) + IMAGE_TAG ?= $(VERSION)-$(DIST) IMAGE = $(IMAGE_NAME):$(IMAGE_TAG) diff --git a/scripts/get-component-versions.sh b/scripts/get-component-versions.sh index b1ef6c52..b14e092e 100755 --- a/scripts/get-component-versions.sh +++ b/scripts/get-component-versions.sh @@ -37,18 +37,19 @@ NVIDIA_DOCKER_ROOT=${PROJECT_ROOT}/third_party/nvidia-docker libnvidia_container_version_tag=$(grep "#define NVC_VERSION" ${LIBNVIDIA_CONTAINER_ROOT}/src/nvc.h \ | sed -e 's/#define NVC_VERSION[[:space:]]"\(.*\)"/\1/') +versions_makefile=${NVIDIA_CONTAINER_TOOLKIT_ROOT}/versions.mk # Get version for nvidia-container-toolit -nvidia_container_toolkit_version=$(grep -m 1 "^LIB_VERSION := " ${NVIDIA_CONTAINER_TOOLKIT_ROOT}/Makefile | sed -e 's/LIB_VERSION :=[[:space:]]\(.*\)[[:space:]]*/\1/') -nvidia_container_toolkit_tag=$(grep -m 1 "^LIB_TAG .= " ${NVIDIA_CONTAINER_TOOLKIT_ROOT}/Makefile | sed -e 's/LIB_TAG .=[[:space:]]\(.*\)[[:space:]]*/\1/') +nvidia_container_toolkit_version=$(grep -m 1 "^LIB_VERSION := " ${versions_makefile} | sed -e 's/LIB_VERSION :=[[:space:]]\(.*\)[[:space:]]*/\1/') +nvidia_container_toolkit_tag=$(grep -m 1 "^LIB_TAG .= " ${versions_makefile} | sed -e 's/LIB_TAG .=[[:space:]]\(.*\)[[:space:]]*/\1/') nvidia_container_toolkit_version_tag="${nvidia_container_toolkit_version}${nvidia_container_toolkit_tag:+~${nvidia_container_toolkit_tag}}" # Get version for nvidia-container-runtime -nvidia_container_runtime_version=$(grep -m 1 "^NVIDIA_CONTAINER_RUNTIME_VERSION := " ${NVIDIA_CONTAINER_TOOLKIT_ROOT}/Makefile | sed -e 's/NVIDIA_CONTAINER_RUNTIME_VERSION :=[[:space:]]\(.*\)[[:space:]]*/\1/') +nvidia_container_runtime_version=$(grep -m 1 "^NVIDIA_CONTAINER_RUNTIME_VERSION := " ${versions_makefile} | sed -e 's/NVIDIA_CONTAINER_RUNTIME_VERSION :=[[:space:]]\(.*\)[[:space:]]*/\1/') nvidia_container_runtime_tag=${nvidia_container_toolkit_tag} nvidia_container_runtime_version_tag="${nvidia_container_runtime_version}${nvidia_container_runtime_tag:+~${nvidia_container_runtime_tag}}" # Get version for nvidia-docker -nvidia_docker_version=$(grep -m 1 "^NVIDIA_DOCKER_VERSION := " ${NVIDIA_CONTAINER_TOOLKIT_ROOT}/Makefile | sed -e 's/NVIDIA_DOCKER_VERSION :=[[:space:]]\(.*\)[[:space:]]*/\1/') +nvidia_docker_version=$(grep -m 1 "^NVIDIA_DOCKER_VERSION := " ${versions_makefile} | sed -e 's/NVIDIA_DOCKER_VERSION :=[[:space:]]\(.*\)[[:space:]]*/\1/') nvidia_docker_tag=${nvidia_container_toolkit_tag} nvidia_docker_version_tag="${nvidia_docker_version}${nvidia_docker_tag:+~${nvidia_docker_tag}}" diff --git a/versions.mk b/versions.mk new file mode 100644 index 00000000..44a78f30 --- /dev/null +++ b/versions.mk @@ -0,0 +1,24 @@ +# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +LIB_NAME := nvidia-container-toolkit +LIB_VERSION := 1.7.0 +LIB_TAG := rc.2 + +# Specify the nvidia-docker2 and nvidia-container-runtime package versions +NVIDIA_DOCKER_VERSION := 2.8.0 +NVIDIA_CONTAINER_RUNTIME_VERSION := 3.6.0 + +CUDA_VERSION := 11.4.2 +GOLANG_VERSION := 1.16.3 From 94849fa8226ef8d0599cec4442e3c3a9b44dad3b Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Mon, 29 Nov 2021 14:36:28 +0100 Subject: [PATCH 4/5] Bump golang version to 1.16.4 Signed-off-by: Evan Lezar --- build/container/Makefile | 1 - versions.mk | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/build/container/Makefile b/build/container/Makefile index bb87d3c8..4e6fb1ce 100644 --- a/build/container/Makefile +++ b/build/container/Makefile @@ -19,7 +19,6 @@ DIST_DIR ?= $(CURDIR)/dist ##### Global variables ##### include $(CURDIR)/versions.mk -GOLANG_VERSION := 1.16.4 ifeq ($(IMAGE_NAME),) REGISTRY ?= nvidia IMAGE_NAME := $(REGISTRY)/container-toolkit diff --git a/versions.mk b/versions.mk index 44a78f30..5642591e 100644 --- a/versions.mk +++ b/versions.mk @@ -21,4 +21,4 @@ NVIDIA_DOCKER_VERSION := 2.8.0 NVIDIA_CONTAINER_RUNTIME_VERSION := 3.6.0 CUDA_VERSION := 11.4.2 -GOLANG_VERSION := 1.16.3 +GOLANG_VERSION := 1.16.4 From b9e752e24e34f535186857d60710d23514a74c46 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Tue, 30 Nov 2021 11:45:52 +0100 Subject: [PATCH 5/5] Update submodules Signed-off-by: Evan Lezar --- third_party/libnvidia-container | 2 +- third_party/nvidia-container-runtime | 2 +- third_party/nvidia-docker | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/third_party/libnvidia-container b/third_party/libnvidia-container index 21641b22..e2d998c6 160000 --- a/third_party/libnvidia-container +++ b/third_party/libnvidia-container @@ -1 +1 @@ -Subproject commit 21641b22b049efabcc2243dc7d6e60df52482e76 +Subproject commit e2d998c6a543bd03158a26c0a68af329ca1cc84e diff --git a/third_party/nvidia-container-runtime b/third_party/nvidia-container-runtime index 35a97617..e54e25d6 160000 --- a/third_party/nvidia-container-runtime +++ b/third_party/nvidia-container-runtime @@ -1 +1 @@ -Subproject commit 35a97617853c5cbd9abf482687678c5808afa13b +Subproject commit e54e25d6402da53cbb1c073d7a5d7f1e07d252a2 diff --git a/third_party/nvidia-docker b/third_party/nvidia-docker index 26293100..9d1e4134 160000 --- a/third_party/nvidia-docker +++ b/third_party/nvidia-docker @@ -1 +1 @@ -Subproject commit 262931007c23c068a8823ecdef1824d5846f79cf +Subproject commit 9d1e41341776ffb58728adbe0f265d68f497e07d