Skip to content

Commit d1e97a0

Browse files
committed
Add integration test for compat libraries
Signed-off-by: Evan Lezar <[email protected]>
1 parent eeef750 commit d1e97a0

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/e2e/nvidia-container-toolkit_test.go

+18
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,22 @@ var _ = Describe("docker", Ordered, func() {
160160
Expect(referenceOutput).To(Equal(out4))
161161
})
162162
})
163+
164+
When("Running a new CUDA container", Ordered, func() {
165+
BeforeAll(func(ctx context.Context) {
166+
_, _, err := r.Run("docker run -d --runtime=nvidia --gpus all --name=cuda-test nvcr.io/nvidia/k8s/cuda-sample:devicequery-cuda12.8.0")
167+
Expect(err).ToNot(HaveOccurred())
168+
})
169+
AfterAll(func(ctx context.Context) {
170+
_, _, err := r.Run("docker rm -f cuda")
171+
Expect(err).ToNot(HaveOccurred())
172+
})
173+
174+
It("should inject the CUDA compat libraries", func(ctx context.Context) {
175+
ldconfigOut, _, err := r.Run("docker exec -it cuda-test bash -c \"ldconfig -p | grep libcuda.so\"")
176+
Expect(err).ToNot(HaveOccurred())
177+
Expect(ldconfigOut).To(ContainSubstring("/usr/local/cuda/compat"))
178+
})
179+
180+
})
163181
})

0 commit comments

Comments
 (0)