Skip to content

Commit 9983817

Browse files
committed
[no-relnote] Add test for conflicting libOpenCL.so.1.0.0
Signed-off-by: Evan Lezar <elezar@nvidia.com>
1 parent fca11cd commit 9983817

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/e2e/nvidia-container-toolkit_test.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,4 +516,21 @@ EOF`)
516516
Expect(strings.TrimSpace(stdout)).To(Equal("Unsuccessful"))
517517
})
518518
})
519+
520+
When("Running a container that installs ocl-icd-libopencl1", Ordered, func() {
521+
BeforeAll(func(ctx context.Context) {
522+
_, _, err := runner.Run("docker pull ubuntu")
523+
Expect(err).ToNot(HaveOccurred())
524+
})
525+
It("should succeed when using the nvidia-container-runtime", func(ctx context.Context) {
526+
_, _, err := runner.Run(`docker run --rm --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all -e NVIDIA_DRIVER_CAPABILITIES=all \
527+
ubuntu bash -c "apt-get update && apt-get install -y ocl-icd-libopencl1"`)
528+
Expect(err).ToNot(HaveOccurred())
529+
})
530+
It("should succeed when using the nvidia-container-runtime-hook", Label("legacy"), func(ctx context.Context) {
531+
_, _, err := runner.Run(`docker run --rm --runtime=runc --gpus=all -e NVIDIA_DRIVER_CAPABILITIES=all \
532+
ubuntu bash -c "apt-get update && apt-get install -y ocl-icd-libopencl1"`)
533+
Expect(err).ToNot(HaveOccurred())
534+
})
535+
})
519536
})

0 commit comments

Comments
 (0)