Skip to content

Commit e39a5f1

Browse files
authored
Fix LD_LIBRARY_PATH for CUDA libraries. Closes #42
CUDA library directories do not have __init__.py files, so __file__ is None when importing them as modules. Using __path__ solves the problem.
1 parent 2460bb6 commit e39a5f1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • root/etc/s6-overlay/s6-rc.d/svc-whisper

root/etc/s6-overlay/s6-rc.d/svc-whisper/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/command/with-contenv bash
22
# shellcheck shell=bash
33

4-
export LD_LIBRARY_PATH=$(python3 -c 'import os; import nvidia.cublas.lib; import nvidia.cudnn.lib; print(os.path.dirname(nvidia.cublas.lib.__file__) + ":" + os.path.dirname(nvidia.cudnn.lib.__file__))')
4+
export LD_LIBRARY_PATH=$(python3 -c 'import os; import nvidia.cublas.lib; import nvidia.cudnn.lib; print(os.path.dirname(nvidia.cublas.lib.__path__[0]) + "/lib:" + os.path.dirname(nvidia.cudnn.lib.__path__[0]) + "/lib")')
55

66
exec \
77
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost 10300" \

0 commit comments

Comments
 (0)