Skip to content

Commit 61f82bf

Browse files
Merge branch 'upstream-patch-1.1.1' into 'master'
Update for patch release 1.1.1 See merge request nvidia/container-toolkit/libnvidia-container!23
2 parents d811ca8 + e5d6156 commit 61f82bf

File tree

8 files changed

+84
-32
lines changed

8 files changed

+84
-32
lines changed

mk/Dockerfile.centos

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@ RUN if [ "$WITH_LIBELF" = "no" ]; then \
4747
WORKDIR /tmp/libnvidia-container
4848
COPY . .
4949

50-
ENV CFLAGS=-I/usr/include/tirpc
51-
ENV LDLIBS=-ltirpc
50+
ARG CFLAGS
51+
ARG LDLIBS
52+
ENV CFLAGS=${CFLAGS}
53+
ENV LDLIBS=${LDFLAGS}
5254
RUN make distclean && make -j"$(nproc)"
5355

5456
ENV DIST_DIR /dist

mk/docker.mk

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ docker-all: $(AMD64_TARGETS) $(X86_64_TARGETS) \
7676

7777
# Default variables for all private '--' targets below.
7878
# One private target is defined for each OS we support.
79+
--%: CFLAGS :=
80+
--%: LDLIBS :=
7981
--%: TARGET_PLATFORM = $(*)
8082
--%: VERSION = $(patsubst $(OS)%-$(ARCH),%,$(TARGET_PLATFORM))
8183
--%: BASEIMAGE = $(OS):$(VERSION)
@@ -85,12 +87,29 @@ docker-all: $(AMD64_TARGETS) $(X86_64_TARGETS) \
8587
--%: docker-build-%
8688
@
8789

90+
# Define verify targets to run a minimal sanity check that everything has built
91+
# and runs correctly for a given OS on amd64/x86_64. Requires a working NVIDIA
92+
# driver installation on a native amd64/x86_64 machine.
93+
$(patsubst %, %-verify, $(AMD64_TARGETS)): ARCH := amd64
94+
$(patsubst %, %-verify, $(AMD64_TARGETS)): %-verify: --verify-%
95+
$(patsubst %, %-verify, $(X86_64_TARGETS)): ARCH := x86_64
96+
$(patsubst %, %-verify, $(X86_64_TARGETS)): %-verify: --verify-%
97+
docker-amd64-verify: $(patsubst %, %-verify, $(AMD64_TARGETS)) \
98+
$(patsubst %, %-verify, $(X86_64_TARGETS))
99+
100+
--verify-%: docker-verify-%
101+
@
102+
88103
# private OS targets with defaults
89104
--ubuntu%: OS := ubuntu
90105
--debian%: OS := debian
91-
--centos%: OS := centos
92106
--amazonlinux%: OS := amazonlinux
93107

108+
# private centos target with overrides
109+
--centos%: OS := centos
110+
--centos8%: CFLAGS := -I/usr/include/tirpc
111+
--centos8%: LDLIBS := -ltirpc
112+
94113
# private opensuse-leap target with overrides
95114
--opensuse-leap%: OS := opensuse-leap
96115
--opensuse-leap%: BASEIMAGE = opensuse/leap:$(VERSION)
@@ -99,6 +118,11 @@ docker-all: $(AMD64_TARGETS) $(X86_64_TARGETS) \
99118
--rhel%: OS := centos
100119
--rhel%: VERSION = $(patsubst rhel%-$(ARCH),%,$(TARGET_PLATFORM))
101120
--rhel%: ARTIFACTS_DIR = $(DIST_DIR)/rhel$(VERSION)/$(ARCH)
121+
--rhel8%: CFLAGS := -I/usr/include/tirpc
122+
--rhel8%: LDLIBS := -ltirpc
123+
124+
--verify-rhel%: OS := centos
125+
--verify-rhel%: VERSION = $(patsubst rhel%-$(ARCH),%,$(TARGET_PLATFORM))
102126

103127
docker-build-%:
104128
@echo "Building for $(TARGET_PLATFORM)"
@@ -112,6 +136,8 @@ docker-build-%:
112136
--build-arg WITH_LIBELF=$(WITH_LIBELF) \
113137
--build-arg WITH_TIRPC=$(WITH_TIRPC) \
114138
--build-arg WITH_SECCOMP=$(WITH_SECCOMP) \
139+
--build-arg CFLAGS=$(CFLAGS) \
140+
--build-arg LDLIBS=$(LDLIBS) \
115141
$(EXTRA_BUILD_ARGS) \
116142
--tag $(BUILDIMAGE) \
117143
--file $(DOCKERFILE) .
@@ -121,6 +147,15 @@ docker-build-%:
121147
-v $(ARTIFACTS_DIR):/dist \
122148
$(BUILDIMAGE)
123149

150+
docker-verify-%: %
151+
@echo "Verifying for $(TARGET_PLATFORM)"
152+
$(DOCKER) run \
153+
--privileged \
154+
--runtime=nvidia \
155+
-e NVIDIA_VISIBLE_DEVICES=all \
156+
--rm $(BUILDIMAGE) \
157+
bash -c "make install; LD_LIBRARY_PATH=/usr/local/lib/ nvidia-container-cli -k -d /dev/tty info"
158+
124159
docker-clean:
125160
IMAGES=$$(docker images "nvidia/$(LIB_NAME)/*" --format="{{.ID}}"); \
126161
if [ "$${IMAGES}" != "" ]; then \

pkg/deb/changelog

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
libnvidia-container (1.1.1-1) UNRELEASED; urgency=medium
2+
3+
* deeb499 Fixup deb packaging files to remove warnings
4+
* 6003504 nvmlSystemGetCudaDriverVersion_v2 to nvmlSystemGetCudaDriverVersion
5+
* 1ee8b60 Update centos8/rhel8 to conditionally set appropriate CFLAGS and LDLIBS
6+
* d746370 Add smoke test to verify functioning build for all OSs on amd64/x86_64
7+
8+
-- NVIDIA CORPORATION <[email protected]> Tue, 19 May 2020 12:05:32 -0700
9+
110
libnvidia-container (1.1.0-1) UNRELEASED; urgency=medium
211

312
* b217c6ad Update build system to support multi-arch builds
@@ -18,7 +27,7 @@ libnvidia-container (1.0.6-1) UNRELEASED; urgency=medium
1827

1928
* b6aff41 Update error messages for CUDA version requirements
2029

21-
-- NVIDIA CORPORATION <[email protected]> Fri, 013 Sep 2019 15:38:16 -0700
30+
-- NVIDIA CORPORATION <[email protected]> Fri, 13 Sep 2019 15:38:16 -0700
2231

2332
libnvidia-container (1.0.5-1) UNRELEASED; urgency=medium
2433

pkg/deb/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Description: NVIDIA container runtime library (development files)
3333

3434
Package: libnvidia-container@MAJOR@-dbg
3535
Section: @SECTION@debug
36-
Priority: extra
36+
Priority: optional
3737
Architecture: any
3838
Multi-Arch: same
3939
Depends: libnvidia-container@MAJOR@ (= ${binary:Version}), ${misc:Depends}
Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
libnvidia-container.so.1 libnvidia-container1 #MINVER#
2-
NVC_1.0@NVC_1.0 1.1.0
3-
nvc_config_free@NVC_1.0 1.1.0
4-
nvc_config_new@NVC_1.0 1.1.0
5-
nvc_container_config_free@NVC_1.0 1.1.0
6-
nvc_container_config_new@NVC_1.0 1.1.0
7-
nvc_container_free@NVC_1.0 1.1.0
8-
nvc_container_new@NVC_1.0 1.1.0
9-
nvc_context_free@NVC_1.0 1.1.0
10-
nvc_context_new@NVC_1.0 1.1.0
11-
nvc_device_info_free@NVC_1.0 1.1.0
12-
nvc_device_info_new@NVC_1.0 1.1.0
13-
nvc_device_mount@NVC_1.0 1.1.0
14-
nvc_mig_device_access_caps_mount@NVC_1.0 1.1.0
15-
nvc_mig_config_global_caps_mount@NVC_1.0 1.1.0
16-
nvc_mig_monitor_global_caps_mount@NVC_1.0 1.1.0
17-
nvc_device_mig_caps_mount@NVC_1.0 1.1.0
18-
nvc_driver_info_free@NVC_1.0 1.1.0
19-
nvc_driver_info_new@NVC_1.0 1.1.0
20-
nvc_driver_mount@NVC_1.0 1.1.0
21-
nvc_error@NVC_1.0 1.1.0
22-
nvc_init@NVC_1.0 1.1.0
23-
nvc_ldcache_update@NVC_1.0 1.1.0
24-
nvc_shutdown@NVC_1.0 1.1.0
25-
nvc_version@NVC_1.0 1.1.0
2+
NVC_1.0@NVC_1.0 1.1.1
3+
nvc_config_free@NVC_1.0 1.1.1
4+
nvc_config_new@NVC_1.0 1.1.1
5+
nvc_container_config_free@NVC_1.0 1.1.1
6+
nvc_container_config_new@NVC_1.0 1.1.1
7+
nvc_container_free@NVC_1.0 1.1.1
8+
nvc_container_new@NVC_1.0 1.1.1
9+
nvc_context_free@NVC_1.0 1.1.1
10+
nvc_context_new@NVC_1.0 1.1.1
11+
nvc_device_info_free@NVC_1.0 1.1.1
12+
nvc_device_info_new@NVC_1.0 1.1.1
13+
nvc_device_mount@NVC_1.0 1.1.1
14+
nvc_mig_device_access_caps_mount@NVC_1.0 1.1.1
15+
nvc_mig_config_global_caps_mount@NVC_1.0 1.1.1
16+
nvc_mig_monitor_global_caps_mount@NVC_1.0 1.1.1
17+
nvc_device_mig_caps_mount@NVC_1.0 1.1.1
18+
nvc_driver_info_free@NVC_1.0 1.1.1
19+
nvc_driver_info_new@NVC_1.0 1.1.1
20+
nvc_driver_mount@NVC_1.0 1.1.1
21+
nvc_error@NVC_1.0 1.1.1
22+
nvc_init@NVC_1.0 1.1.1
23+
nvc_ldcache_update@NVC_1.0 1.1.1
24+
nvc_shutdown@NVC_1.0 1.1.1
25+
nvc_version@NVC_1.0 1.1.1

pkg/rpm/SPECS/libnvidia-container.spec

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ This package contains command-line tools that facilitate using the library.
8585
%{_bindir}/*
8686

8787
%changelog
88+
* Tue May 19 2020 NVIDIA CORPORATION <[email protected]> 1.1.1-1
89+
- deeb499 Fixup deb packaging files to remove warnings
90+
- 6003504 nvmlSystemGetCudaDriverVersion_v2 to nvmlSystemGetCudaDriverVersion
91+
- 1ee8b60 Update centos8/rhel8 to conditionally set appropriate CFLAGS and LDLIBS
92+
- d746370 Add smoke test to verify functioning build for all OSs on amd64/x86_64
93+
8894
* Fri May 15 2020 NVIDIA CORPORATION <[email protected]> 1.1.0-1
8995
- b217c6ad Update build system to support multi-arch builds
9096
- 1ddcdfc1 Add support for MIG (Milti-Instance-GPUs)

src/driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ driver_get_cuda_version_1_svc(ptr_t ctxptr, driver_get_cuda_version_res *res, ma
353353
int version;
354354

355355
memset(res, 0, sizeof(*res));
356-
if (call_nvml(ctx, nvmlSystemGetCudaDriverVersion_v2, &version) < 0)
356+
if (call_nvml(ctx, nvmlSystemGetCudaDriverVersion, &version) < 0)
357357
goto fail;
358358

359359
res->driver_get_cuda_version_res_u.vers.major = (unsigned int)version / 1000;

src/nvc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ extern "C" {
1515

1616
#define NVC_MAJOR 1
1717
#define NVC_MINOR 1
18-
#define NVC_PATCH 0
19-
#define NVC_VERSION "1.1.0"
18+
#define NVC_PATCH 1
19+
#define NVC_VERSION "1.1.1"
2020

2121
#define NVC_ARG_MAX 256
2222

0 commit comments

Comments
 (0)