mirror of
https://github.com/jamesstringer90/appsandbox.git
synced 2026-10-22 11:03:15 -05:00
NVENC/NVDEC userspace path + nvidia-smi shortcut
- systemd-user environment generator and appsandbox-gpu wrapper both append /usr/lib/wsl/lib to LD_LIBRARY_PATH. ldconfig has the .so.1 entries cached, but the 9P mount is read-only so the unversioned symlinks ldconfig wants to create can't be written. dlopen() of unversioned names (libcuda.so, libnvidia-encode.so, libnvcuvid.so) needs the path on LD_LIBRARY_PATH — without it ffmpeg's h264_nvenc / h264_cuvid plugins fail with 'Cannot load libcuda.so.1'. - setup.sh: symlink /usr/lib/wsl/lib/nvidia-smi to /usr/local/bin so the bare command works without env tweaks. Created unconditionally because the symlink target is resolved at exec time — the file appears under the agent's 9P mount on first boot regardless of when the symlink was created.
This commit is contained in:
1 parent
2309cec029
commit
194cadeaa6
3 files changed
+27
-3
No files matched your search
@@ -2762,6 +2762,15 @@ static BOOL generate_ubuntu_setup_sh(const wchar_t *path, BOOL ssh_enabled)
|
||||
"fi\n"
|
||||
"ldconfig\n"
|
||||
"\n"
|
||||
"# --- 7b. nvidia-smi on PATH ---\n"
|
||||
"# WSL/GPU-PV ships nvidia-smi via the host 9P mount at\n"
|
||||
"# /usr/lib/wsl/lib/nvidia-smi (only present when the VM has a\n"
|
||||
"# GPU partition + the agent has mounted the share). The symlink\n"
|
||||
"# is created unconditionally — symlink target is resolved at\n"
|
||||
"# exec time, so it 'comes alive' once the agent mounts the share\n"
|
||||
"# at first boot, with or without the file existing now.\n"
|
||||
"ln -sf /usr/lib/wsl/lib/nvidia-smi /usr/local/bin/nvidia-smi\n"
|
||||
"\n"
|
||||
"# --- 8. daemon-reload, enable the helper services, set graphical ---\n"
|
||||
"# (Helper binaries + service files are already installed by section 3.\n"
|
||||
"# Clipboard has no system service — agent spawns it as a child.)\n"
|
||||
|
||||
Reference in new issue
Block a user