Skip to content

Commit 3d5be45

Browse files
author
Evan Lezar
committed
Merge branch 'prep-for-release' into 'master'
Specify toolkit version when building runtime and docker packages See merge request nvidia/container-toolkit/container-toolkit!70
2 parents ee6545f + 4d945e9 commit 3d5be45

File tree

8 files changed

+30
-15
lines changed

8 files changed

+30
-15
lines changed

docker/Dockerfile.debian

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ WORKDIR $DIST_DIR
6161
COPY packaging/debian ./debian
6262

6363
RUN sed -i "s;@VERSION@;${REVISION};" debian/changelog && \
64+
dch --changelog debian/changelog --append "Bump libnvidia-container dependency to ${REVISION}}" && \
65+
dch --changelog debian/changelog -r "" && \
6466
if [ "$REVISION" != "$(dpkg-parsechangelog --show-field=Version)" ]; then exit 1; fi
6567

6668
CMD export DISTRIB="$(lsb_release -cs)" && \

docker/Dockerfile.ubuntu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ WORKDIR $DIST_DIR
5454
COPY packaging/debian ./debian
5555

5656
RUN sed -i "s;@VERSION@;${REVISION};" debian/changelog && \
57+
dch --changelog debian/changelog --append "Bump libnvidia-container dependency to ${REVISION}}" && \
58+
dch --changelog debian/changelog -r "" && \
5759
if [ "$REVISION" != "$(dpkg-parsechangelog --show-field=Version)" ]; then exit 1; fi
5860

5961
CMD export DISTRIB="$(lsb_release -cs)" && \

scripts/build-all-components.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,19 @@ make -C ${LIBNVIDIA_CONTAINER_ROOT} -f mk/docker.mk ${TARGET}
5555
# Build nvidia-container-toolkit
5656
make -C ${NVIDIA_CONTAINER_TOOLKIT_ROOT} ${TARGET}
5757

58-
# We set the TOOLKIT_VERSION for the nvidia-container-runtime and nvidia-docker targets
59-
# TODO: This is not yet enabled in the makefiles below
60-
: ${PREVIOUS_TOOLKIT_VERSION:=1.5.1}
61-
echo "Using TOOLKIT_VERSION=${PREVIOUS_TOOLKIT_VERSION} as previous nvidia-container-toolkit version"
58+
if [[ -z ${NVIDIA_CONTAINER_TOOLKIT_VERSION} ]]; then
59+
eval $(${SCRIPTS_DIR}/get-component-versions.sh)
60+
fi
6261

62+
# We set the TOOLKIT_VERSION for the nvidia-container-runtime and nvidia-docker targets
6363
# Build nvidia-container-runtime
64-
make -C ${NVIDIA_CONTAINER_RUNTIME_ROOT} TOOLKIT_VERSION=${PREVIOUS_TOOLKIT_VERSION} ${TARGET}
64+
make -C ${NVIDIA_CONTAINER_RUNTIME_ROOT} \
65+
TOOLKIT_VERSION="${NVIDIA_CONTAINER_TOOLKIT_VERSION}" \
66+
TOOLKIT_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \
67+
${TARGET}
6568

6669
# Build nvidia-docker2
67-
make -C ${NVIDIA_DOCKER_ROOT} TOOLKIT_VERSION=${PREVIOUS_TOOLKIT_VERSION} ${TARGET}
70+
make -C ${NVIDIA_DOCKER_ROOT} \
71+
TOOLKIT_VERSION="${NVIDIA_CONTAINER_TOOLKIT_VERSION}" \
72+
TOOLKIT_TAG="${NVIDIA_CONTAINER_TOOLKIT_TAG}" \
73+
${TARGET}

scripts/get-component-versions.sh

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,28 +34,29 @@ PROJECT_ROOT="$( cd ${SCRIPTS_DIR}/.. && pwd )"
3434
: ${NVIDIA_DOCKER_ROOT:=${PROJECT_ROOT}/third_party/nvidia-docker}
3535

3636
# Get version for libnvidia-container
37-
libnvidia_container_version=$(grep "#define NVC_VERSION" ${LIBNVIDIA_CONTAINER_ROOT}/src/nvc.h \
37+
libnvidia_container_version_tag=$(grep "#define NVC_VERSION" ${LIBNVIDIA_CONTAINER_ROOT}/src/nvc.h \
3838
| sed -e 's/#define NVC_VERSION[[:space:]]"\(.*\)"/\1/')
3939

4040
# Get version for nvidia-container-toolit
4141
nvidia_container_toolkit_version=$(grep -m 1 "^LIB_VERSION := " ${NVIDIA_CONTAINER_TOOLKIT_ROOT}/Makefile | sed -e 's/LIB_VERSION :=[[:space:]]\(.*\)[[:space:]]*/\1/')
4242
nvidia_container_toolkit_tag=$(grep -m 1 "^LIB_TAG .= " ${NVIDIA_CONTAINER_TOOLKIT_ROOT}/Makefile | sed -e 's/LIB_TAG .=[[:space:]]\(.*\)[[:space:]]*/\1/')
43-
nvidia_container_toolkit_version="${nvidia_container_toolkit_version}${nvidia_container_toolkit_tag:+~${nvidia_container_toolkit_tag}}"
43+
nvidia_container_toolkit_version_tag="${nvidia_container_toolkit_version}${nvidia_container_toolkit_tag:+~${nvidia_container_toolkit_tag}}"
4444

4545
# Get version for nvidia-container-runtime
4646
nvidia_container_runtime_version=$(grep -m 1 "^LIB_VERSION := " ${NVIDIA_CONTAINER_RUNTIME_ROOT}/Makefile | sed -e 's/LIB_VERSION :=[[:space:]]\(.*\)[[:space:]]*/\1/')
4747
nvidia_container_runtime_tag=$(grep -m 1 "^LIB_TAG .= " ${NVIDIA_CONTAINER_RUNTIME_ROOT}/Makefile | sed -e 's/LIB_TAG .=[[:space:]]\(.*\)[[:space:]]*/\1/')
48-
nvidia_container_runtime_version="${nvidia_container_runtime_version}${nvidia_container_runtime_tag:+~${nvidia_container_runtime_tag}}"
48+
nvidia_container_runtime_version_tag="${nvidia_container_runtime_version}${nvidia_container_runtime_tag:+~${nvidia_container_runtime_tag}}"
4949

5050
# Get version for nvidia-docker
5151
nvidia_docker_version=$(grep -m 1 "^LIB_VERSION := " ${NVIDIA_DOCKER_ROOT}/Makefile | sed -e 's/LIB_VERSION :=[[:space:]]\(.*\)[[:space:]]*/\1/')
5252
nvidia_docker_tag=$(grep -m 1 "^LIB_TAG .= " ${NVIDIA_DOCKER_ROOT}/Makefile | sed -e 's/LIB_TAG .=[[:space:]]\(.*\)[[:space:]]*/\1/')
53-
nvidia_docker_version="${nvidia_docker_version}${nvidia_docker_tag:+~${nvidia_docker_tag}}"
53+
nvidia_docker_version_tag="${nvidia_docker_version}${nvidia_docker_tag:+~${nvidia_docker_tag}}"
5454

5555

56-
echo "LIBNVIDIA_CONTAINER_VERSION=${libnvidia_container_version}"
56+
echo "LIBNVIDIA_CONTAINER_VERSION=${libnvidia_container_version_tag}"
5757
echo "NVIDIA_CONTAINER_TOOLKIT_VERSION=${nvidia_container_toolkit_version}"
58-
if [[ "${libnvidia_container_version}" != "${nvidia_container_toolkit_version}" ]]; then
58+
echo "NVIDIA_CONTAINER_TOOLKIT_TAG=${nvidia_container_toolkit_tag}"
59+
if [[ "${libnvidia_container_version_tag}" != "${nvidia_container_toolkit_version_tag}" ]]; then
5960
>&2 echo "WARNING: The libnvidia-container and nvidia-container-toolkit versions do not match"
6061
fi
6162
echo "NVIDIA_CONTAINER_RUNTIME_VERSION=${nvidia_container_runtime_version}"

scripts/release.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ else
5252
targets=${all[@]}
5353
fi
5454

55+
eval $(${SCRIPTS_DIR}/get-component-versions.sh)
56+
export NVIDIA_CONTAINER_TOOLKIT_VERSION
57+
export NVIDIA_CONTAINER_TOOLKIT_TAG
58+
5559
for target in ${targets[@]}; do
5660
${SCRIPTS_DIR}/build-all-components.sh ${target}
5761
done

third_party/libnvidia-container

Submodule libnvidia-container updated from fc1b6c4 to badec1f
Submodule nvidia-container-runtime updated from cd6aef4 to 1a27fc4

third_party/nvidia-docker

Submodule nvidia-docker updated from 4613cda to 1b78009

0 commit comments

Comments
 (0)