Merge branch 'master' into experimental

This commit is contained in:
Evan Lezar 2022-01-31 14:07:36 +01:00
commit 8551c71a8a
10 changed files with 93 additions and 11 deletions

View File

@ -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 <cudatools@nvidia.com> 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 * [libnvidia-container] Add support for cgroupv2
* Release toolkit-container images from nvidia-container-toolkit repository * Release toolkit-container images from nvidia-container-toolkit repository
-- NVIDIA CORPORATION <cudatools@nvidia.com> Wed, 08 Dec 2021 12:56:49 +010 -- NVIDIA CORPORATION <cudatools@nvidia.com> Wed, 08 Dec 2021 12:56:49 +0100
nvidia-container-toolkit (1.7.0-1) UNRELEASED; urgency=medium nvidia-container-toolkit (1.7.0-1) UNRELEASED; urgency=medium

View File

@ -64,6 +64,9 @@ rm -f %{_bindir}/nvidia-container-runtime-hook
/usr/share/containers/oci/hooks.d/oci-nvidia-hook.json /usr/share/containers/oci/hooks.d/oci-nvidia-hook.json
%changelog %changelog
* Thu Jan 20 2022 NVIDIA CORPORATION <cudatools@nvidia.com> 1.8.0-0.1.rc.2
- Remove support for building amazonlinux1 packages
* Wed Dec 08 2021 NVIDIA CORPORATION <cudatools@nvidia.com> 1.8.0-0.1.rc.1 * Wed Dec 08 2021 NVIDIA CORPORATION <cudatools@nvidia.com> 1.8.0-0.1.rc.1
- [libnvidia-container] Add support for cgroupv2 - [libnvidia-container] Add support for cgroupv2
- Release toolkit-container images from nvidia-container-toolkit repository - Release toolkit-container images from nvidia-container-toolkit repository

View File

@ -51,7 +51,25 @@ else
targets=${all[@]} targets=${all[@]}
fi 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) 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_VERSION
export NVIDIA_CONTAINER_TOOLKIT_TAG export NVIDIA_CONTAINER_TOOLKIT_TAG
export NVIDIA_CONTAINER_RUNTIME_VERSION export NVIDIA_CONTAINER_RUNTIME_VERSION

36
scripts/update-components.sh Executable file
View File

@ -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

View File

@ -31,6 +31,8 @@ testing::toolkit::install() {
test -L "${shared_dir}/usr/local/nvidia/toolkit/libnvidia-container.so.1" 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 -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-cli"
test -e "${shared_dir}/usr/local/nvidia/toolkit/nvidia-container-toolkit" test -e "${shared_dir}/usr/local/nvidia/toolkit/nvidia-container-toolkit"

@ -1 +1 @@
Subproject commit 0b7fa90ce0721b010a5e80ecf53ceb43280a33b4 Subproject commit d48f9b0d505fca0aff7c88cee790f9c56aa1b851

@ -1 +1 @@
Subproject commit e54e25d6402da53cbb1c073d7a5d7f1e07d252a2 Subproject commit 3588013b7d2a15783b3ca417b6f992197313ad5b

@ -1 +1 @@
Subproject commit 9d1e41341776ffb58728adbe0f265d68f497e07d Subproject commit 51d3c9e22b2b891773ab9525eaf7b3ce1c014ab1

View File

@ -152,7 +152,7 @@ func Install(cli *cli.Context) error {
return fmt.Errorf("could not create required directories: %v", err) return fmt.Errorf("could not create required directories: %v", err)
} }
err = installContainerLibrary(toolkitDirArg) err = installContainerLibraries(toolkitDirArg)
if err != nil { if err != nil {
return fmt.Errorf("error installing NVIDIA container library: %v", err) return fmt.Errorf("error installing NVIDIA container library: %v", err)
} }
@ -180,14 +180,31 @@ func Install(cli *cli.Context) error {
return nil 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 // A predefined set of library candidates are considered, with the first one
// resulting in success being installed to the toolkit folder. The install process // resulting in success being installed to the toolkit folder. The install process
// resolves the symlink for the library and copies the versioned library itself. // 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) 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) libraryPath, err := findLibrary("", libName)
if err != nil { if err != nil {
return fmt.Errorf("error locating NVIDIA container library: %v", err) return fmt.Errorf("error locating NVIDIA container library: %v", err)

View File

@ -14,11 +14,11 @@
LIB_NAME := nvidia-container-toolkit LIB_NAME := nvidia-container-toolkit
LIB_VERSION := 1.8.0 LIB_VERSION := 1.8.0
LIB_TAG := rc.1 LIB_TAG := rc.2
# Specify the nvidia-docker2 and nvidia-container-runtime package versions # Specify the nvidia-docker2 and nvidia-container-runtime package versions
NVIDIA_DOCKER_VERSION := 2.9.0 NVIDIA_DOCKER_VERSION := 2.9.0
NVIDIA_CONTAINER_RUNTIME_VERSION := 3.8.0 NVIDIA_CONTAINER_RUNTIME_VERSION := 3.8.0
CUDA_VERSION := 11.4.2 CUDA_VERSION := 11.6.0
GOLANG_VERSION := 1.16.4 GOLANG_VERSION := 1.16.4