mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-21 15:57:49 +00:00
Remove tooling to build packages
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
7a9bc14d98
commit
fcdf565586
@ -45,8 +45,6 @@ echo "Building ${TARGET} for all packages to ${DIST_DIR}"
|
|||||||
|
|
||||||
: "${LIBNVIDIA_CONTAINER_ROOT:=${PROJECT_ROOT}/third_party/libnvidia-container}"
|
: "${LIBNVIDIA_CONTAINER_ROOT:=${PROJECT_ROOT}/third_party/libnvidia-container}"
|
||||||
: "${NVIDIA_CONTAINER_TOOLKIT_ROOT:=${PROJECT_ROOT}}"
|
: "${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}"
|
|
||||||
|
|
||||||
|
|
||||||
"${SCRIPTS_DIR}/get-component-versions.sh"
|
"${SCRIPTS_DIR}/get-component-versions.sh"
|
||||||
@ -70,57 +68,3 @@ make -C "${NVIDIA_CONTAINER_TOOLKIT_ROOT}" \
|
|||||||
LIBNVIDIA_CONTAINER_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \
|
LIBNVIDIA_CONTAINER_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \
|
||||||
"${TARGET}"
|
"${TARGET}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If required we also build the nvidia-container-runtime and nvidia-docker packages.
|
|
||||||
# Since these are essentially meta packages intended to allow for users to
|
|
||||||
# transition from older installation workflows, we skip these for rc builds
|
|
||||||
# (NVIDIA_CONTAINER_TOOLKIT_TAG != "") and releases with a non-zero patch
|
|
||||||
# version of 0.
|
|
||||||
if [[ -n ${FORCE_META_PACKAGES} || -z ${NVIDIA_CONTAINER_TOOLKIT_TAG} && "${NVIDIA_CONTAINER_TOOLKIT_VERSION%.0}" != "${NVIDIA_CONTAINER_TOOLKIT_VERSION}" ]]; then
|
|
||||||
package_format=$(package_type ${TARGET})
|
|
||||||
package_target=$(get_package_target ${TARGET})
|
|
||||||
|
|
||||||
# We set the TOOLKIT_VERSION, TOOLKIT_TAG for the nvidia-container-runtime and nvidia-docker targets
|
|
||||||
# The LIB_TAG is also overridden to match the TOOLKIT_TAG.
|
|
||||||
|
|
||||||
# Build nvidia-container-runtime if required
|
|
||||||
package_name="nvidia-container-runtime"
|
|
||||||
package_version=${NVIDIA_CONTAINER_RUNTIME_VERSION}${NVIDIA_CONTAINER_TOOLKIT_TAG:+~${NVIDIA_CONTAINER_TOOLKIT_TAG}}-1
|
|
||||||
package_pattern=${DIST_DIR}/${package_format}/all/${package_name}?${package_version}?*.${package_format}
|
|
||||||
package=$(ls ${package_pattern}) || echo ""
|
|
||||||
if [[ -z ${package} ]]; then
|
|
||||||
echo "${package_name} does not exist"
|
|
||||||
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}" \
|
|
||||||
${TARGET}
|
|
||||||
fi
|
|
||||||
if [[ -n ${package_target} ]]; then
|
|
||||||
mkdir -p ${DIST_DIR}/${package_target}/
|
|
||||||
cp -p ${package_pattern} ${DIST_DIR}/${package_target}/
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build nvidia-docker2 if required
|
|
||||||
package_name="nvidia-docker2"
|
|
||||||
package_version=${NVIDIA_DOCKER_VERSION}${NVIDIA_CONTAINER_TOOLKIT_TAG:+~${NVIDIA_CONTAINER_TOOLKIT_TAG}}-1
|
|
||||||
package_pattern=${DIST_DIR}/${package_format}/all/${package_name}?${package_version}?*.${package_format}
|
|
||||||
package=$(ls ${package_pattern}) || echo ""
|
|
||||||
if [[ -z ${package} ]]; then
|
|
||||||
echo "${package_name} does not exist"
|
|
||||||
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}" \
|
|
||||||
${TARGET}
|
|
||||||
fi
|
|
||||||
if [[ -n ${package_target} ]]; then
|
|
||||||
mkdir -p ${DIST_DIR}/${package_target}/
|
|
||||||
cp -p ${package_pattern} ${DIST_DIR}/${package_target}/
|
|
||||||
fi
|
|
||||||
|
|
||||||
else
|
|
||||||
echo "Skipping nvidia-container-runtime and nvidia-docker builds."
|
|
||||||
fi
|
|
||||||
|
@ -47,8 +47,6 @@ eval $(${SCRIPTS_DIR}/get-component-versions.sh)
|
|||||||
|
|
||||||
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_DOCKER_VERSION
|
|
||||||
|
|
||||||
for target in ${targets[@]}; do
|
for target in ${targets[@]}; do
|
||||||
"${SCRIPTS_DIR}/build-all-components.sh" "${target}"
|
"${SCRIPTS_DIR}/build-all-components.sh" "${target}"
|
||||||
|
@ -37,8 +37,7 @@ PACKAGE_IMAGE=$1
|
|||||||
: "${ARTIFACTS_DIR="${PROJECT_ROOT}/artifacts"}"
|
: "${ARTIFACTS_DIR="${PROJECT_ROOT}/artifacts"}"
|
||||||
|
|
||||||
# For release-candidates we skip certain packages.
|
# For release-candidates we skip certain packages.
|
||||||
# For example, we don't release release candidates of nvidia-container-runtime and nvidia-docker2
|
# This function returns 0 if a package should be skipped and 1 otherwise.
|
||||||
# since these only bump the nvidia-container-toolkit dependency.
|
|
||||||
function skip-for-release-candidate() {
|
function skip-for-release-candidate() {
|
||||||
# We always skip nvidia-container-toolkit-operator-extensions packages
|
# We always skip nvidia-container-toolkit-operator-extensions packages
|
||||||
if [[ "${package_name/"nvidia-container-toolkit-operator-extensions"/}" != "${package_name}" ]]; then
|
if [[ "${package_name/"nvidia-container-toolkit-operator-extensions"/}" != "${package_name}" ]]; then
|
||||||
@ -53,14 +52,6 @@ function skip-for-release-candidate() {
|
|||||||
if [[ "${VERSION%.0}" == "${VERSION}" ]]; then
|
if [[ "${VERSION%.0}" == "${VERSION}" ]]; then
|
||||||
is_non_patch_full_release=0
|
is_non_patch_full_release=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local package_name=$1
|
|
||||||
if [[ "${package_name/"nvidia-docker2"/}" != "${package_name}" ]]; then
|
|
||||||
return ${is_non_patch_full_release}
|
|
||||||
fi
|
|
||||||
if [[ "${package_name/"nvidia-container-runtime"/}" != "${package_name}" ]]; then
|
|
||||||
return ${is_non_patch_full_release}
|
|
||||||
fi
|
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,8 +29,6 @@ SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../scripts && pwd )"
|
|||||||
PROJECT_ROOT="$( cd ${SCRIPTS_DIR}/.. && pwd )"
|
PROJECT_ROOT="$( cd ${SCRIPTS_DIR}/.. && pwd )"
|
||||||
|
|
||||||
NVIDIA_CONTAINER_TOOLKIT_ROOT=${PROJECT_ROOT}
|
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
|
|
||||||
|
|
||||||
versions_makefile=${NVIDIA_CONTAINER_TOOLKIT_ROOT}/versions.mk
|
versions_makefile=${NVIDIA_CONTAINER_TOOLKIT_ROOT}/versions.mk
|
||||||
# Get version for nvidia-container-toolit
|
# Get version for nvidia-container-toolit
|
||||||
@ -38,22 +36,6 @@ nvidia_container_toolkit_version=$(grep -m 1 "^LIB_VERSION := " ${versions_makef
|
|||||||
nvidia_container_toolkit_tag=$(grep -m 1 "^LIB_TAG .= " ${versions_makefile} | sed -e 's/LIB_TAG .=[[: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}}"
|
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 := " ${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 := " ${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}}"
|
|
||||||
|
|
||||||
echo "NVIDIA_CONTAINER_TOOLKIT_VERSION=${nvidia_container_toolkit_version}"
|
echo "NVIDIA_CONTAINER_TOOLKIT_VERSION=${nvidia_container_toolkit_version}"
|
||||||
echo "NVIDIA_CONTAINER_TOOLKIT_TAG=${nvidia_container_toolkit_tag}"
|
echo "NVIDIA_CONTAINER_TOOLKIT_TAG=${nvidia_container_toolkit_tag}"
|
||||||
echo "NVIDIA_CONTAINER_TOOLKIT_PACKAGE_VERSION=${nvidia_container_toolkit_version_tag//\~/-}"
|
echo "NVIDIA_CONTAINER_TOOLKIT_PACKAGE_VERSION=${nvidia_container_toolkit_version_tag//\~/-}"
|
||||||
echo "NVIDIA_CONTAINER_RUNTIME_VERSION=${nvidia_container_runtime_version}"
|
|
||||||
echo "NVIDIA_CONTAINER_RUNTIME_TAG=${nvidia_container_runtime_tag}"
|
|
||||||
echo "NVIDIA_CONTAINER_RUNTIME_PACKAGE_VERSION=${nvidia_container_runtime_version_tag//\~/-}"
|
|
||||||
echo "NVIDIA_DOCKER_VERSION=${nvidia_docker_version}"
|
|
||||||
echo "NVIDIA_DOCKER_TAG=${nvidia_docker_tag}"
|
|
||||||
echo "NVIDIA_DOCKER_PACKAGE_VERSION=${nvidia_docker_version_tag//\~/-}"
|
|
||||||
|
@ -142,19 +142,6 @@ function sync() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
if [[ ${REPO} == "stable" ]]; then
|
|
||||||
for f in $(ls ${src}/nvidia-container-runtime*.${pkg_type} ${src}/nvidia-docker*.${pkg_type}); do
|
|
||||||
df=${dst}/$(basename ${f})
|
|
||||||
df_stable=${df//"/experimental/"/"/stable/"}
|
|
||||||
if [[ -f "${df}" ]]; then
|
|
||||||
echo "${df} already exists; skipping"
|
|
||||||
elif [[ ${REPO} == "experimental" && -f ${df_stable} ]]; then
|
|
||||||
echo "${df_stable} already exists; skipping"
|
|
||||||
else
|
|
||||||
cp ${f} ${df}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
targets=${all[@]}
|
targets=${all[@]}
|
||||||
@ -191,18 +178,6 @@ done
|
|||||||
|
|
||||||
git -C ${PACKAGE_REPO_ROOT} add ${REPO}
|
git -C ${PACKAGE_REPO_ROOT} add ${REPO}
|
||||||
|
|
||||||
if [[ "${REPO}" == "stable" ]]; then
|
|
||||||
# Stable release
|
|
||||||
git -C ${PACKAGE_REPO_ROOT} commit -s -F- <<EOF
|
|
||||||
Add packages for NVIDIA Container Toolkit ${VERSION} release
|
|
||||||
|
|
||||||
These include:
|
|
||||||
* libnvidia-container* ${LIBNVIDIA_CONTAINER_PACKAGE_VERSION}
|
|
||||||
* nvidia-container-toolkit ${NVIDIA_CONTAINER_TOOLKIT_PACKAGE_VERSION}
|
|
||||||
* nvidia-container-runtime ${NVIDIA_CONTAINER_RUNTIME_PACKAGE_VERSION}
|
|
||||||
* nvidia-docker ${NVIDIA_DOCKER_PACKAGE_VERSION}
|
|
||||||
EOF
|
|
||||||
else
|
|
||||||
# Experimental / release candidate release
|
# Experimental / release candidate release
|
||||||
git -C ${PACKAGE_REPO_ROOT} commit -s -F- <<EOF
|
git -C ${PACKAGE_REPO_ROOT} commit -s -F- <<EOF
|
||||||
Add packages for NVIDIA Container Toolkit ${VERSION} ${REPO} release
|
Add packages for NVIDIA Container Toolkit ${VERSION} ${REPO} release
|
||||||
@ -211,7 +186,6 @@ These include:
|
|||||||
* libnvidia-container* ${LIBNVIDIA_CONTAINER_PACKAGE_VERSION}
|
* libnvidia-container* ${LIBNVIDIA_CONTAINER_PACKAGE_VERSION}
|
||||||
* nvidia-container-toolkit ${NVIDIA_CONTAINER_TOOLKIT_PACKAGE_VERSION}
|
* nvidia-container-toolkit ${NVIDIA_CONTAINER_TOOLKIT_PACKAGE_VERSION}
|
||||||
EOF
|
EOF
|
||||||
fi
|
|
||||||
|
|
||||||
: ${MASTER_KEY_PATH:? Path to master key MASTER_KEY_PATH must be set}
|
: ${MASTER_KEY_PATH:? Path to master key MASTER_KEY_PATH must be set}
|
||||||
: ${SUB_KEY_PATH:? Path to sub key SUB_KEY_PATH must be set}
|
: ${SUB_KEY_PATH:? Path to sub key SUB_KEY_PATH must be set}
|
||||||
@ -242,12 +216,12 @@ function sign() {
|
|||||||
sign deb
|
sign deb
|
||||||
|
|
||||||
git -C ${PACKAGE_REPO_ROOT} add ${REPO}
|
git -C ${PACKAGE_REPO_ROOT} add ${REPO}
|
||||||
git -C ${PACKAGE_REPO_ROOT} commit -s -m "TOFIX: Sign deb packages for ${VERSION} in ${REPO}"
|
git -C ${PACKAGE_REPO_ROOT} commit -s -m "fixup! Add packages for NVIDIA Container Toolkit ${VERSION} ${REPO} release"
|
||||||
|
|
||||||
sign rpm
|
sign rpm
|
||||||
|
|
||||||
git -C ${PACKAGE_REPO_ROOT} add ${REPO}
|
git -C ${PACKAGE_REPO_ROOT} add ${REPO}
|
||||||
git -C ${PACKAGE_REPO_ROOT} commit -s -m "TOFIX: Sign rpm packages for ${VERSION} in ${REPO}"
|
git -C ${PACKAGE_REPO_ROOT} commit -s -m "fixup! Add packages for NVIDIA Container Toolkit ${VERSION} ${REPO} release"
|
||||||
|
|
||||||
echo "To publish changes, go to ${PACKAGE_REPO_ROOT} and run: "
|
echo "To publish changes, go to ${PACKAGE_REPO_ROOT} and run:"
|
||||||
echo " git rebase -i ${UPSTREAM_REFERENCE}"
|
echo " git rebase -i ${UPSTREAM_REFERENCE}"
|
||||||
|
@ -21,12 +21,6 @@ LIB_TAG := rc.4
|
|||||||
PACKAGE_VERSION := $(LIB_VERSION)$(if $(LIB_TAG),~$(LIB_TAG))
|
PACKAGE_VERSION := $(LIB_VERSION)$(if $(LIB_TAG),~$(LIB_TAG))
|
||||||
PACKAGE_REVISION := 1
|
PACKAGE_REVISION := 1
|
||||||
|
|
||||||
# Specify the nvidia-docker2 and nvidia-container-runtime package versions.
|
|
||||||
# Note: The build tooling uses `LIB_TAG` above as the version tag.
|
|
||||||
# This is appended to the versions below if specified.
|
|
||||||
NVIDIA_DOCKER_VERSION := 2.14.0
|
|
||||||
NVIDIA_CONTAINER_RUNTIME_VERSION := 3.14.0
|
|
||||||
|
|
||||||
GOLANG_VERSION := 1.22.1
|
GOLANG_VERSION := 1.22.1
|
||||||
|
|
||||||
BUILDIMAGE_TAG ?= devel-go$(GOLANG_VERSION)
|
BUILDIMAGE_TAG ?= devel-go$(GOLANG_VERSION)
|
||||||
|
Loading…
Reference in New Issue
Block a user