Skip to content

fix(nvidia): rebuild ld.so.cache at boot for legacy container injection - #2835

Merged
kummatty merged 1 commit into
awslabs:mainfrom
kummatty:main
Sep 26, 2026
Merged

kummatty merged 1 commit into
awslabs:mainfrom
kummatty:main

Conversation

@kummatty

@kummatty kummatty commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Issue #, if available:
#2834

Description of changes:

ldconfig was dropped from the boot path because nothing on the default path needs the host cache. The container toolkit that ships with the AMI (v1.20.0) resolves auto to jit-cdi, whose library discovery automatically looks at /user/lib64. The container's own cache is separately rebuilt in-container by the CDI update-ldcache hook. And on the host, /usr/lib64 is a trusted directory for ld.so, so dlopen finds the driver libraries with no cache at all.

The nvidia-container-runtime" that ships with older versions of GPU operator (v.1.17.0) ships with a legacy mode that looks for shared objects in only the cache.

In this PR we are going to rebuild the cache through an ldconfig service which executes after the usr-lib64 mounts

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Testing Done

Built an AMI and tested the following in a build instance

sudo nvidia-container-cli list --libraries | grep -E 'libnvidia-ml|libcuda\.so'
/usr/lib64/libnvidia-ml.so.580.178.04
/usr/lib64/libcuda.so.580.178.04

@kummatty
kummatty merged commit a2a561b into awslabs:main Sep 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(nvidia): ld.so.cache not rebuilt after driver tree overlay since v20260917, NVML fails with ERROR_LIBRARY_NOT_FOUND

2 participants