Skip to content

Conversation

@elezar
Copy link
Member

@elezar elezar commented Dec 9, 2025

Fixes #1526

@coveralls
Copy link

coveralls commented Dec 9, 2025

Pull Request Test Coverage Report for Build 20072385429

Details

  • 5 of 38 (13.16%) changed or added relevant lines in 1 file are covered.
  • 9 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.09%) to 36.841%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/ldconfig/ldconfig.go 5 38 13.16%
Files with Coverage Reduction New Missed Lines %
internal/ldconfig/ldconfig.go 9 31.51%
Totals Coverage Status
Change from base Build 20071794718: -0.09%
Covered Lines: 5206
Relevant Lines: 14131

💛 - Coveralls

@elezar
Copy link
Member Author

elezar commented Dec 11, 2025

/cherry-pick release-1.18

@elezar elezar added this to the v1.18.2 milestone Dec 11, 2025
Copy link

@rahulait rahulait left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'll let folks who have more context to this repo approve the PR.

Copy link
Contributor

@cdesiniotis cdesiniotis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @elezar. I have one minor suggestion about logging. I am approving this PR assuming that comment gets addressed. My other two comments are questions that should not be viewed as blockers.


// Also output the folders to the alpine .path file as required.
if err := createAlpinePathFileIfRequired(append(filteredDirectories, systemSearchPaths...)...); err != nil {
return err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a more descriptive error message here.

Comment on lines +609 to +614
It("nvidia-smi should succeed when using the nvidia-container-runtime-hook", Label("legacy"), func(ctx context.Context) {
output, _, err := runner.Run(`docker run --rm --runtime=nvidia -e NVIDIA_VISIBLE_DEVICES=all -e NVIDIA_DRIVER_CAPABILITIES=all \
alpinecompat nvidia-smi -L`)
Expect(err).ToNot(HaveOccurred())
Expect(output).To(Equal(hostOutput))
})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question -- was this test case passing before the relevant changes in this PR? If so, what is libnvidia-container doing to handle containers that use musl instead of glibc?

return outputListToFile(pathFile, dirs...)
}

func isAlpine() bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially out-of-scope -- is there an easy way of detecting if musl is the standard C library used in a distro? If yes, would we be open to expanding this change to be distro-agnostic? Meaning we would create the /etc/ld-musl-$ARCH.path file for any container that uses musl?

A quick LLM query suggested the below:

ldd --version 2>&1 | grep -q musl && echo "Using musl" || echo "Using glibc"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix driver injection in alpine linux containers

4 participants