diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 54c8899c..eb0699f3 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,9 +1,15 @@ -nvidia-container-toolkit (1.8.0~rc.1-1) experimental; urgency=medium +nvidia-container-toolkit (1.8.0~rc.2-1) UNRELEASED; urgency=medium + + * Remove support for building amazonlinux1 packages + + -- NVIDIA CORPORATION Thu, 20 Jan 2022 13:38:48 +0100 + +nvidia-container-toolkit (1.8.0~rc.1-1) UNRELEASED; urgency=medium * [libnvidia-container] Add support for cgroupv2 * Release toolkit-container images from nvidia-container-toolkit repository - -- NVIDIA CORPORATION Wed, 08 Dec 2021 12:56:49 +010 + -- NVIDIA CORPORATION Wed, 08 Dec 2021 12:56:49 +0100 nvidia-container-toolkit (1.7.0-1) UNRELEASED; urgency=medium diff --git a/packaging/rpm/SPECS/nvidia-container-toolkit.spec b/packaging/rpm/SPECS/nvidia-container-toolkit.spec index 4f5ad861..27b00c52 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 +* Thu Jan 20 2022 NVIDIA CORPORATION 1.8.0-0.1.rc.2 +- Remove support for building amazonlinux1 packages + * Wed Dec 08 2021 NVIDIA CORPORATION 1.8.0-0.1.rc.1 - [libnvidia-container] Add support for cgroupv2 - Release toolkit-container images from nvidia-container-toolkit repository diff --git a/scripts/release.sh b/scripts/release.sh index 2744823f..355d635a 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -51,7 +51,25 @@ else targets=${all[@]} fi +echo "Updating components" +${SCRIPTS_DIR}/update-components.sh +if [[ -n $(git status -s third_party) && ${ALLOW_LOCAL_COMPONENT_CHANGES} != "true" ]]; then + echo "ERROR: Building with local component changes." + echo "Commit pending changes or rerun with ALLOW_LOCAL_COMPONENT_CHANGES='true'" + exit 1 +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 + 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}}'" + set -x + [[ ${ALLOW_VERSION_MISMATCH} == "true" ]] || exit 1 +fi + export NVIDIA_CONTAINER_TOOLKIT_VERSION export NVIDIA_CONTAINER_TOOLKIT_TAG export NVIDIA_CONTAINER_RUNTIME_VERSION diff --git a/scripts/update-components.sh b/scripts/update-components.sh new file mode 100755 index 00000000..f8825313 --- /dev/null +++ b/scripts/update-components.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +# 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. + +set -e -x + +SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../scripts && pwd )" +PROJECT_ROOT="$( cd ${SCRIPTS_DIR}/.. && pwd )" + +git submodule update --init + +echo "Component status before update" +git submodule status + +# We update all submodules from their respective remotes +# NOTE: Appending `-- [PATH]` will limit the update to a specific component +git submodule update --remote + +if [[ -z $(git status -s third_party) ]]; then + echo "Components already up to date" +else + echo "Components updated" + git submodule status +fi diff --git a/test/container/toolkit_test.sh b/test/container/toolkit_test.sh index 5fcc4a08..7a21169c 100644 --- a/test/container/toolkit_test.sh +++ b/test/container/toolkit_test.sh @@ -31,6 +31,8 @@ testing::toolkit::install() { test -L "${shared_dir}/usr/local/nvidia/toolkit/libnvidia-container.so.1" test -e "$(${READLINK} -f "${shared_dir}/usr/local/nvidia/toolkit/libnvidia-container.so.1")" + test -L "${shared_dir}/usr/local/nvidia/toolkit/libnvidia-container-go.so.1" + test -e "$(${READLINK} -f "${shared_dir}/usr/local/nvidia/toolkit/libnvidia-container-go.so.1")" test -e "${shared_dir}/usr/local/nvidia/toolkit/nvidia-container-cli" test -e "${shared_dir}/usr/local/nvidia/toolkit/nvidia-container-toolkit" diff --git a/third_party/libnvidia-container b/third_party/libnvidia-container index 0b7fa90c..d48f9b0d 160000 --- a/third_party/libnvidia-container +++ b/third_party/libnvidia-container @@ -1 +1 @@ -Subproject commit 0b7fa90ce0721b010a5e80ecf53ceb43280a33b4 +Subproject commit d48f9b0d505fca0aff7c88cee790f9c56aa1b851 diff --git a/third_party/nvidia-container-runtime b/third_party/nvidia-container-runtime index e54e25d6..3588013b 160000 --- a/third_party/nvidia-container-runtime +++ b/third_party/nvidia-container-runtime @@ -1 +1 @@ -Subproject commit e54e25d6402da53cbb1c073d7a5d7f1e07d252a2 +Subproject commit 3588013b7d2a15783b3ca417b6f992197313ad5b diff --git a/third_party/nvidia-docker b/third_party/nvidia-docker index 9d1e4134..51d3c9e2 160000 --- a/third_party/nvidia-docker +++ b/third_party/nvidia-docker @@ -1 +1 @@ -Subproject commit 9d1e41341776ffb58728adbe0f265d68f497e07d +Subproject commit 51d3c9e22b2b891773ab9525eaf7b3ce1c014ab1 diff --git a/tools/container/toolkit/toolkit.go b/tools/container/toolkit/toolkit.go index 6aa3fc3b..bcc8f805 100644 --- a/tools/container/toolkit/toolkit.go +++ b/tools/container/toolkit/toolkit.go @@ -152,7 +152,7 @@ func Install(cli *cli.Context) error { return fmt.Errorf("could not create required directories: %v", err) } - err = installContainerLibrary(toolkitDirArg) + err = installContainerLibraries(toolkitDirArg) if err != nil { return fmt.Errorf("error installing NVIDIA container library: %v", err) } @@ -180,14 +180,31 @@ func Install(cli *cli.Context) error { return nil } -// installContainerLibrary locates and installs the libnvidia-container.so.1 library. +// installContainerLibraries locates and installs the libraries that are part of +// the nvidia-container-toolkit. // A predefined set of library candidates are considered, with the first one // resulting in success being installed to the toolkit folder. The install process // resolves the symlink for the library and copies the versioned library itself. -func installContainerLibrary(toolkitDir string) error { +func installContainerLibraries(toolkitDir string) error { log.Infof("Installing NVIDIA container library to '%v'", toolkitDir) - const libName = "libnvidia-container.so.1" + libs := []string{ + "libnvidia-container.so.1", + "libnvidia-container-go.so.1", + } + + for _, l := range libs { + err := installLibrary(l, toolkitDir) + if err != nil { + return fmt.Errorf("failed to install %s: %v", l, err) + } + } + + return nil +} + +// installLibrary installs the specified library to the toolkit directory. +func installLibrary(libName string, toolkitDir string) error { libraryPath, err := findLibrary("", libName) if err != nil { return fmt.Errorf("error locating NVIDIA container library: %v", err) diff --git a/versions.mk b/versions.mk index ff75c4d7..8a9e5086 100644 --- a/versions.mk +++ b/versions.mk @@ -14,11 +14,11 @@ LIB_NAME := nvidia-container-toolkit LIB_VERSION := 1.8.0 -LIB_TAG := rc.1 +LIB_TAG := rc.2 # Specify the nvidia-docker2 and nvidia-container-runtime package versions NVIDIA_DOCKER_VERSION := 2.9.0 NVIDIA_CONTAINER_RUNTIME_VERSION := 3.8.0 -CUDA_VERSION := 11.4.2 +CUDA_VERSION := 11.6.0 GOLANG_VERSION := 1.16.4