2023-04-05 12:36:58 +02:00
|
|
|
@ECHO OFF
|
2023-04-23 12:28:15 +02:00
|
|
|
SETLOCAL ENABLEDELAYEDEXPANSION
|
2023-03-17 13:33:33 +01:00
|
|
|
|
|
|
|
:: Start as administrator
|
2023-04-05 12:38:43 +02:00
|
|
|
fltmc >NUL 2>&1 || (
|
2023-09-13 11:51:35 +02:00
|
|
|
PowerShell Start -Verb RunAs '%0' 2>NUL || (
|
|
|
|
EXIT 1
|
|
|
|
)
|
|
|
|
EXIT 0
|
2023-03-17 13:33:33 +01:00
|
|
|
)
|
|
|
|
|
2023-04-23 12:35:50 +02:00
|
|
|
ECHO Fix for /usr/lib/wsl/lib/libcuda.so.1
|
2023-03-17 13:33:33 +01:00
|
|
|
|
|
|
|
ECHO Enter the folder
|
|
|
|
CD \Windows\System32\lxss\lib
|
|
|
|
|
2023-04-23 12:28:15 +02:00
|
|
|
set "files=libcuda.so libcuda.so.1"
|
|
|
|
|
2023-03-17 13:33:33 +01:00
|
|
|
ECHO Remove existing symlinks
|
2023-04-23 12:28:15 +02:00
|
|
|
for %%i in (!files!) do (
|
2023-09-13 11:51:35 +02:00
|
|
|
DEL %%i
|
2023-04-23 12:28:15 +02:00
|
|
|
)
|
2023-03-17 13:33:33 +01:00
|
|
|
|
2023-03-17 14:57:57 +01:00
|
|
|
:: Create new symlinks
|
2023-04-23 12:28:15 +02:00
|
|
|
for %%i in (!files!) do (
|
2023-09-13 11:51:35 +02:00
|
|
|
MKLINK %%i libcuda.so.1.1
|
2023-04-23 12:28:15 +02:00
|
|
|
)
|
2023-03-17 14:56:04 +01:00
|
|
|
|
2023-04-23 12:35:21 +02:00
|
|
|
:: Update symlinks and rebuild the cache
|
|
|
|
bash -c "sudo ldconfig && echo 'Updated symbolic links and rebuilt cache'"
|
|
|
|
|
2023-03-17 14:56:04 +01:00
|
|
|
PAUSE
|
2023-04-05 12:42:54 +02:00
|
|
|
EXIT /B
|