From 26747088d5ee69ca92a434400b23f9d9c5efcb6e Mon Sep 17 00:00:00 2001 From: Darren Gibbard Date: Thu, 9 May 2024 10:48:55 +0100 Subject: [PATCH] Fix for #127 - Use common dir for Nvidia Passthrough --- jlmkr.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jlmkr.py b/jlmkr.py index 6a8396b..24646c6 100755 --- a/jlmkr.py +++ b/jlmkr.py @@ -365,6 +365,8 @@ def passthrough_nvidia( .decode() .split("\n") if x + # Strip individual modules for current kernel, since we add the whole directory later + and "/usr/lib/x86_64-linux-gnu/nvidia/current" not in x ] ) ) @@ -382,6 +384,9 @@ def passthrough_nvidia( # while mounting the symlink will be resolved and nvidia-smi will appear as a regular file nvidia_files.add("/usr/bin/nvidia-smi") + # Use common module dir + nvidia_files.add("/usr/lib/x86_64-linux-gnu/nvidia/current") + nvidia_mounts = [] for file_path in nvidia_files: @@ -926,7 +931,7 @@ def get_zfs_dataset(path): # Put back spaces which were encoded # https://github.com/openzfs/zfs/issues/11182 return field.replace('\\040', ' ') - + path = os.path.realpath(path) with open("/proc/mounts", "r") as f: for line in f: