From 27bb5cca0cb7ec9f1fc299678876f3285e146e48 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Mon, 29 Nov 2021 10:15:29 +0100 Subject: [PATCH] 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}