Skip to content

Commit

Permalink
Add integration test for compat libraries
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Lezar <[email protected]>
  • Loading branch information
elezar committed Feb 7, 2025
1 parent eeef750 commit d1e97a0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/e2e/nvidia-container-toolkit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,22 @@ var _ = Describe("docker", Ordered, func() {
Expect(referenceOutput).To(Equal(out4))
})
})

When("Running a new CUDA container", Ordered, func() {
BeforeAll(func(ctx context.Context) {
_, _, err := r.Run("docker run -d --runtime=nvidia --gpus all --name=cuda-test nvcr.io/nvidia/k8s/cuda-sample:devicequery-cuda12.8.0")
Expect(err).ToNot(HaveOccurred())
})
AfterAll(func(ctx context.Context) {
_, _, err := r.Run("docker rm -f cuda")
Expect(err).ToNot(HaveOccurred())
})

It("should inject the CUDA compat libraries", func(ctx context.Context) {
ldconfigOut, _, err := r.Run("docker exec -it cuda-test bash -c \"ldconfig -p | grep libcuda.so\"")
Expect(err).ToNot(HaveOccurred())
Expect(ldconfigOut).To(ContainSubstring("/usr/local/cuda/compat"))
})

})
})

0 comments on commit d1e97a0

Please sign in to comment.