Skip to content

Commit

Permalink
Add Nvidia libraries to Unix exclusion list (#7746)
Browse files Browse the repository at this point in the history
While packaging an application that uses pynvml on Linux, the library 
libnvidia-ml.so.1 may be bundled into the resulting application. This 
library is part of the Nvidia driver stack and this behavior creates 
an incompatibility if the packaging system and runtime system do not 
have the same driver version (or are compatible in some vague sense I 
don't understand).

For my application and I assume pretty much every application that 
might want to bundle pynvml this way, libnvidia-ml.so.1 should be 
excluded from the final distribution.
  • Loading branch information
SnoopJ committed Jul 1, 2023
1 parent c342dac commit 45bb271
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions PyInstaller/depend/dylib.py
Expand Up @@ -209,6 +209,13 @@
# graphical interface libraries come with graphical stack (see libglvnd)
r'libE?(Open)?GLX?(ESv1_CM|ESv2)?(dispatch)?\.so(\..*)?',
r'libdrm\.so(\..*)?',
# a subset of libraries included as part of the Nvidia Linux Graphics Driver as of 520.56.06:
# https://download.nvidia.com/XFree86/Linux-x86_64/520.56.06/README/installedcomponents.html
r'nvidia_drv\.so',
r'libglxserver_nvidia\.so(\..*)?',
r'libnvidia-egl-(gbm|wayland)\.so(\..*)?',
r'libnvidia-(cfg|compiler|e?glcore|glsi|glvkspirv|rtcore|allocator|tls|ml)\.so(\..*)?',
r'lib(EGL|GLX)_nvidia\.so(\..*)?',
# libxcb-dri changes ABI frequently (e.g.: between Ubuntu LTS releases) and is usually installed as dependency of
# the graphics stack anyway. No need to bundle it.
r'libxcb\.so(\..*)?',
Expand Down
1 change: 1 addition & 0 deletions news/7746.bugfix.rst
@@ -0,0 +1 @@
Exclude Nvidia graphics driver libraries from vendoring.

0 comments on commit 45bb271

Please sign in to comment.