mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-22 08:18:32 +00:00
Add basic version checks
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
parent
34e023361b
commit
5ee2150eaa
@ -46,14 +46,22 @@ echo "Building ${TARGET} for all packages to ${DIST_DIR}"
|
||||
: ${NVIDIA_CONTAINER_RUNTIME_ROOT:=${PROJECT_ROOT}/third_party/nvidia-container-runtime}
|
||||
: ${NVIDIA_DOCKER_ROOT:=${PROJECT_ROOT}/third_party/nvidia-docker}
|
||||
|
||||
|
||||
${SCRIPTS_DIR}/get-versions.sh
|
||||
|
||||
# Build libnvidia-container
|
||||
make -C ${LIBNVIDIA_CONTAINER_ROOT} -f mk/docker.mk ${TARGET}
|
||||
|
||||
# Build nvidia-container-toolkit
|
||||
make -C ${NVIDIA_CONTAINER_TOOLKIT_ROOT} ${TARGET}
|
||||
|
||||
# We set the TOOLKIT_VERSION for the nvidia-container-runtime and nvidia-docker targets
|
||||
# TODO: This is not yet enabled in the makefiles below
|
||||
: ${PREVIOUS_TOOLKIT_VERSION:=1.5.1}
|
||||
echo "Using TOOLKIT_VERSION=${PREVIOUS_TOOLKIT_VERSION} as previous nvidia-container-toolkit version"
|
||||
|
||||
# Build nvidia-container-runtime
|
||||
make -C ${NVIDIA_CONTAINER_RUNTIME_ROOT} ${TARGET}
|
||||
make -C ${NVIDIA_CONTAINER_RUNTIME_ROOT} TOOLKIT_VERSION=${PREVIOUS_TOOLKIT_VERSION} ${TARGET}
|
||||
|
||||
# Build nvidia-docker2
|
||||
make -C ${NVIDIA_DOCKER_ROOT} ${TARGET}
|
||||
make -C ${NVIDIA_DOCKER_ROOT} TOOLKIT_VERSION=${PREVIOUS_TOOLKIT_VERSION} ${TARGET}
|
||||
|
@ -53,7 +53,10 @@ nvidia_docker_tag=$(grep -m 1 "^LIB_TAG .= " ${NVIDIA_DOCKER_ROOT}/Makefile | se
|
||||
nvidia_docker_version="${nvidia_docker_version}${nvidia_docker_tag:+~${nvidia_docker_tag}}"
|
||||
|
||||
|
||||
echo "libnvidia-container version=${libnvidia_container_version}"
|
||||
echo "nvidia-container-toolkit version=${nvidia_container_toolkit_version}"
|
||||
echo "nvidia-container-runtime version=${nvidia_container_runtime_version}"
|
||||
echo "nvidia-docker version=${nvidia_docker_version}"
|
||||
echo "LIBNVIDIA_CONTAINER_VERSION=${libnvidia_container_version}"
|
||||
echo "NVIDIA_CONTAINER_TOOLKIT_VERSION=${nvidia_container_toolkit_version}"
|
||||
if [[ "${libnvidia_container_version}" != "${nvidia_container_toolkit_version}" ]]; then
|
||||
>&2 echo "WARNING: The libnvidia-container and nvidia-container-toolkit versions do not match"
|
||||
fi
|
||||
echo "NVIDIA_CONTAINER_RUNTIME_VERSION=${nvidia_container_runtime_version}"
|
||||
echo "NVIDIA_DOCKER_VERSION=${nvidia_docker_version}"
|
||||
|
Loading…
Reference in New Issue
Block a user