init: also clean empty unversioned .so stubs during nvidia setup#2024
Open
edodusi wants to merge 1 commit into89luca89:mainfrom
Open
init: also clean empty unversioned .so stubs during nvidia setup#2024edodusi wants to merge 1 commit into89luca89:mainfrom
edodusi wants to merge 1 commit into89luca89:mainfrom
Conversation
The existing cleanup pattern `*.so.*` only matches versioned libraries (e.g. libcuda.so.1) but misses unversioned stubs (e.g. libcuda.so, libnvcuvid.so). After a driver upgrade, these remain as empty 0-byte files and are not overwritten by the subsequent bind-mounts, which only mount the versioned files. Applications that dlopen the unversioned name (like DaVinci Resolve for CUDA) load the empty file and silently fall back to OpenCL. Widen the glob to `*.so*` so that both versioned and unversioned empty stubs are removed before the host driver libraries are mounted. Fixes 89luca89#1764 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.sostubs (e.g.libcuda.so,libnvcuvid.so) not being cleaned up during--nvidiainitialization*.so.*only matches versioned libraries but misses unversioned ones, which remain as 0-byte files after driver upgradesdlopen()the unversioned name (e.g. DaVinci Resolve for CUDA) load the empty stub and silently fall back to OpenCL*.so.*to*.so*so both versioned and unversioned empty stubs are removed before host driver bind-mountsFixes #1764
Test plan
--nvidiaon a host with NVIDIA driversls -la /usr/lib64/libcuda.sois not a 0-byte file after container restartnvidia-smi) detect CUDA correctly.sofiles are not affected (thefinduses-empty)🤖 Generated with Claude Code