From fcdf5655864f6a55d97bba04aa4c275f1285177e Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Fri, 12 Apr 2024 14:15:26 +0200 Subject: [PATCH] Remove tooling to build packages Signed-off-by: Evan Lezar --- scripts/build-all-components.sh | 56 ------------------------------- scripts/build-packages.sh | 2 -- scripts/extract-packages.sh | 11 +----- scripts/get-component-versions.sh | 18 ---------- scripts/release-packages.sh | 32 ++---------------- versions.mk | 6 ---- 6 files changed, 4 insertions(+), 121 deletions(-) diff --git a/scripts/build-all-components.sh b/scripts/build-all-components.sh index 0c34a627..5af1e720 100755 --- a/scripts/build-all-components.sh +++ b/scripts/build-all-components.sh @@ -45,8 +45,6 @@ echo "Building ${TARGET} for all packages to ${DIST_DIR}" : "${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}" "${SCRIPTS_DIR}/get-component-versions.sh" @@ -70,57 +68,3 @@ make -C "${NVIDIA_CONTAINER_TOOLKIT_ROOT}" \ LIBNVIDIA_CONTAINER_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \ "${TARGET}" 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 diff --git a/scripts/build-packages.sh b/scripts/build-packages.sh index 2e91877b..0fc1b036 100755 --- a/scripts/build-packages.sh +++ b/scripts/build-packages.sh @@ -47,8 +47,6 @@ 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}" diff --git a/scripts/extract-packages.sh b/scripts/extract-packages.sh index 76c6873d..be288de2 100755 --- a/scripts/extract-packages.sh +++ b/scripts/extract-packages.sh @@ -37,8 +37,7 @@ PACKAGE_IMAGE=$1 : "${ARTIFACTS_DIR="${PROJECT_ROOT}/artifacts"}" # For release-candidates we skip certain packages. -# For example, we don't release release candidates of nvidia-container-runtime and nvidia-docker2 -# since these only bump the nvidia-container-toolkit dependency. +# This function returns 0 if a package should be skipped and 1 otherwise. function skip-for-release-candidate() { # We always skip nvidia-container-toolkit-operator-extensions packages 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 is_non_patch_full_release=0 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 } diff --git a/scripts/get-component-versions.sh b/scripts/get-component-versions.sh index 14f4ef66..111f9343 100755 --- a/scripts/get-component-versions.sh +++ b/scripts/get-component-versions.sh @@ -29,8 +29,6 @@ SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../scripts && pwd )" PROJECT_ROOT="$( cd ${SCRIPTS_DIR}/.. && pwd )" 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 # 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_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_TAG=${nvidia_container_toolkit_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//\~/-}" diff --git a/scripts/release-packages.sh b/scripts/release-packages.sh index 7991f932..8c91965a 100755 --- a/scripts/release-packages.sh +++ b/scripts/release-packages.sh @@ -142,19 +142,6 @@ function sync() { fi 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[@]} @@ -191,18 +178,6 @@ done git -C ${PACKAGE_REPO_ROOT} add ${REPO} -if [[ "${REPO}" == "stable" ]]; then -# Stable release -git -C ${PACKAGE_REPO_ROOT} commit -s -F- <