Skip to content

Commit 05978af

Browse files
committed
Alloing InstallGPU / hasCUDA to be overridden in install scripts
1 parent 12fa592 commit 05978af

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

CodeProject.AI-Server.code-workspace

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@
8686
}
8787
],
8888
"settings": {
89-
"csharp.debug.logging.moduleLoad": false
89+
"csharp.debug.logging.moduleLoad": false,
90+
"cSpell.words": [
91+
"paddlepaddle"
92+
]
9093
}
9194
}

src/scripts/utils.bat

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ shift & goto :%~1
904904
if "!requirementsFilename!" == "" (
905905

906906
REM Unless installGPU is false, we are installing CUDA equipped packages
907-
REM even if EnableGPU = false in the modulesettings files. This allows
907+
REM even if installGPU = false in the modulesettings files. This allows
908908
REM you to toggle CUDA support at runtime, rather than install time.
909909
if /i "!installGPU!" == "true" (
910910
if /i "!hasCUDA!" == "true" (
@@ -1414,7 +1414,10 @@ shift & goto :%~1
14141414
if /i "!prevPart!" == "cuDNN" (
14151415
if /i "!part:~0,1!" == "v" (
14161416
set "cuDNN_version=!part:~1!"
1417-
REM @echo cuDNN version = !cuDNN_version!
1417+
1418+
for /f "tokens=1 delims=." %%c in ("!cuDNN_version!") do ( set cuDNN_major_version=%%c )
1419+
1420+
REM @echo cuDNN version = !cuDNN_version! / !cuDNN_major_version!
14181421
exit /b
14191422
) else (
14201423
set prevPart=!part!

src/setup.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,6 +1075,8 @@ REM Saves the state of the installation environment
10751075
set stateCurrentDir=%cd%
10761076
set stateVerbosity=!verbosity!
10771077
set stateOneStepPIP=!oneStepPIP!
1078+
set stateHasCUDA=!hasCUDA!
1079+
set stateInstallGPU=!installGPU!
10781080

10791081
exit /b
10801082

@@ -1084,5 +1086,7 @@ REM Restores the state of the installation environment
10841086
cd "!stateCurrentDir!"
10851087
set verbosity=!stateVerbosity!
10861088
set oneStepPIP=!stateOneStepPIP!
1089+
set hasCUDA=!stateHasCUDA!
1090+
set installGPU=!stateInstallGPU!
10871091

10881092
exit /b

0 commit comments

Comments
 (0)