mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-25 21:39:10 +00:00
Update build all components for meta packages
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
8a2de90c28
commit
c30764b7cc
@ -36,6 +36,8 @@ fi
|
|||||||
|
|
||||||
TARGET=$1
|
TARGET=$1
|
||||||
|
|
||||||
|
source "${SCRIPTS_DIR}"/utils.sh
|
||||||
|
|
||||||
: "${DIST_DIR:=${PROJECT_ROOT}/dist}"
|
: "${DIST_DIR:=${PROJECT_ROOT}/dist}"
|
||||||
export DIST_DIR
|
export DIST_DIR
|
||||||
|
|
||||||
@ -67,24 +69,43 @@ make -C "${NVIDIA_CONTAINER_TOOLKIT_ROOT}" \
|
|||||||
# transition from older installation workflows, we skip these for rc builds
|
# transition from older installation workflows, we skip these for rc builds
|
||||||
# (NVIDIA_CONTAINER_TOOLKIT_TAG != "") and releases with a non-zero patch
|
# (NVIDIA_CONTAINER_TOOLKIT_TAG != "") and releases with a non-zero patch
|
||||||
# version of 0.
|
# version of 0.
|
||||||
if [[ -z ${NVIDIA_CONTAINER_TOOLKIT_TAG} && "${NVIDIA_CONTAINER_TOOLKIT_VERSION%.0}" != "${NVIDIA_CONTAINER_TOOLKIT_VERSION}" ]]; then
|
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})
|
||||||
|
|
||||||
# We set the TOOLKIT_VERSION, TOOLKIT_TAG for the nvidia-container-runtime and nvidia-docker targets
|
# 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.
|
# The LIB_TAG is also overridden to match the TOOLKIT_TAG.
|
||||||
# Build nvidia-container-runtime
|
|
||||||
|
# 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} \
|
make -C ${NVIDIA_CONTAINER_RUNTIME_ROOT} \
|
||||||
LIB_VERSION="${NVIDIA_CONTAINER_RUNTIME_VERSION}" \
|
LIB_VERSION="${NVIDIA_CONTAINER_RUNTIME_VERSION}" \
|
||||||
LIB_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \
|
LIB_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \
|
||||||
TOOLKIT_VERSION="${NVIDIA_CONTAINER_TOOLKIT_VERSION}" \
|
TOOLKIT_VERSION="${NVIDIA_CONTAINER_TOOLKIT_VERSION}" \
|
||||||
TOOLKIT_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \
|
TOOLKIT_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \
|
||||||
${TARGET}
|
${TARGET}
|
||||||
|
fi
|
||||||
|
cp ${package_pattern} ${DIST_DIR}/$(get_package_target ${TARGET})/
|
||||||
|
|
||||||
# Build nvidia-docker2
|
# 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} \
|
make -C ${NVIDIA_DOCKER_ROOT} \
|
||||||
LIB_VERSION="${NVIDIA_DOCKER_VERSION}" \
|
LIB_VERSION="${NVIDIA_DOCKER_VERSION}" \
|
||||||
LIB_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \
|
LIB_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \
|
||||||
TOOLKIT_VERSION="${NVIDIA_CONTAINER_TOOLKIT_VERSION}" \
|
TOOLKIT_VERSION="${NVIDIA_CONTAINER_TOOLKIT_VERSION}" \
|
||||||
TOOLKIT_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \
|
TOOLKIT_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \
|
||||||
${TARGET}
|
${TARGET}
|
||||||
|
fi
|
||||||
|
cp ${package_pattern} ${DIST_DIR}/$(get_package_target ${TARGET})/
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "Skipping nvidia-container-runtime and nvidia-docker builds."
|
echo "Skipping nvidia-container-runtime and nvidia-docker builds."
|
||||||
|
@ -34,3 +34,10 @@ function get_artifactory_repository() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function get_package_target() {
|
||||||
|
local target=$1
|
||||||
|
local dist=${target%-*}
|
||||||
|
local arch=${target##*-}
|
||||||
|
echo "${dist}/${arch}"
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user