diff --git a/scripts/build-all.sh b/scripts/build-all.sh index e9c3379b..752211e4 100755 --- a/scripts/build-all.sh +++ b/scripts/build-all.sh @@ -46,14 +46,22 @@ echo "Building ${TARGET} for all packages to ${DIST_DIR}" : ${NVIDIA_CONTAINER_RUNTIME_ROOT:=${PROJECT_ROOT}/third_party/nvidia-container-runtime} : ${NVIDIA_DOCKER_ROOT:=${PROJECT_ROOT}/third_party/nvidia-docker} + +${SCRIPTS_DIR}/get-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} +# We set the TOOLKIT_VERSION for the nvidia-container-runtime and nvidia-docker targets +# TODO: This is not yet enabled in the makefiles below +: ${PREVIOUS_TOOLKIT_VERSION:=1.5.1} +echo "Using TOOLKIT_VERSION=${PREVIOUS_TOOLKIT_VERSION} as previous nvidia-container-toolkit version" + # Build nvidia-container-runtime -make -C ${NVIDIA_CONTAINER_RUNTIME_ROOT} ${TARGET} +make -C ${NVIDIA_CONTAINER_RUNTIME_ROOT} TOOLKIT_VERSION=${PREVIOUS_TOOLKIT_VERSION} ${TARGET} # Build nvidia-docker2 -make -C ${NVIDIA_DOCKER_ROOT} ${TARGET} \ No newline at end of file +make -C ${NVIDIA_DOCKER_ROOT} TOOLKIT_VERSION=${PREVIOUS_TOOLKIT_VERSION} ${TARGET} diff --git a/scripts/get-versions.sh b/scripts/get-versions.sh index efc0a7ec..2c51a700 100755 --- a/scripts/get-versions.sh +++ b/scripts/get-versions.sh @@ -53,7 +53,10 @@ nvidia_docker_tag=$(grep -m 1 "^LIB_TAG .= " ${NVIDIA_DOCKER_ROOT}/Makefile | se nvidia_docker_version="${nvidia_docker_version}${nvidia_docker_tag:+~${nvidia_docker_tag}}" -echo "libnvidia-container version=${libnvidia_container_version}" -echo "nvidia-container-toolkit version=${nvidia_container_toolkit_version}" -echo "nvidia-container-runtime version=${nvidia_container_runtime_version}" -echo "nvidia-docker version=${nvidia_docker_version}" +echo "LIBNVIDIA_CONTAINER_VERSION=${libnvidia_container_version}" +echo "NVIDIA_CONTAINER_TOOLKIT_VERSION=${nvidia_container_toolkit_version}" +if [[ "${libnvidia_container_version}" != "${nvidia_container_toolkit_version}" ]]; then + >&2 echo "WARNING: The libnvidia-container and nvidia-container-toolkit versions do not match" +fi +echo "NVIDIA_CONTAINER_RUNTIME_VERSION=${nvidia_container_runtime_version}" +echo "NVIDIA_DOCKER_VERSION=${nvidia_docker_version}"