init: also clean empty unversioned .so stubs during nvidia setup#2034
Open
edodusi wants to merge 1 commit into89luca89:nextfrom
Open
init: also clean empty unversioned .so stubs during nvidia setup#2034edodusi wants to merge 1 commit into89luca89:nextfrom
edodusi wants to merge 1 commit into89luca89:nextfrom
Conversation
Widen the find glob from "*.so.*" to "*.so*" so that unversioned .so stubs (e.g. libcuda.so, libnvcuvid.so) left behind after driver upgrades are also removed during --nvidia initialization. Applications that dlopen() the unversioned name (e.g. DaVinci Resolve for CUDA) would otherwise silently load the empty stub and fall back to OpenCL. Fixes 89luca89#1764 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Port of #2024 to the
nextbranch.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-mounts--nvidia— without it, Resolve silently loses CUDA support after every driver update and freezes on the Edit pageFixes #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)