Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions tests/e2e/nvidia-container-toolkit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,14 +430,16 @@ EOF`)
})

It("should not fail when using the nvidia-container-runtime", func(ctx context.Context) {
_, _, err := runner.Run("docker run --rm --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all -e NVIDIA_DRIVER_CAPABILITIES=all firmware-test")
output, _, err := runner.Run("docker run --rm --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all -e NVIDIA_DRIVER_CAPABILITIES=all firmware-test")
Expect(err).ToNot(HaveOccurred())
Expect(output).To(BeEmpty())
})

It("should fail when using the nvidia-container-runtime-hook", Label("legacy"), func(ctx context.Context) {
_, stderr, err := runner.Run("docker run --rm --runtime=runc --gpus=all firmware-test")
Expect(err).To(HaveOccurred())
Expect(stderr).To(ContainSubstring(": mount error: path error: /lib/firmware/nvidia/"))
// TODO: Note that this requires Docker >= 29.2.0
It("should not fail when using the --gpus flag", Label("legacy"), func(ctx context.Context) {
output, _, err := runner.Run("docker run --rm --runtime=runc --gpus=all firmware-test")
Expect(err).ToNot(HaveOccurred())
Expect(output).To(BeEmpty())
})
})

Expand Down