Skip to content

Commit 0170281

Browse files
committed
Fix the name error and exit caused by judgment failed, test=document_fix
1 parent 5a589b2 commit 0170281

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

tools/windows/build_compile_environment.bat

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
:: Echo command is not required.
3232
@echo off
33+
cd /d %~dp0%
3334

3435
:: ===== start step 0: wget tool =====
3536
:: Download wget for windows when there is not wget tool.
@@ -145,7 +146,7 @@ echo Install Visual Studio 2015 ...
145146
:: /norestart [no restart]
146147
:: /NoRefresh [no refresh]
147148
:: /InstallSelectableItems NativeLanguageSupport_Group [select Visual C++ for installing]
148-
start /wait visual_installer.exe /passive /norestart /NoRefresh /InstallSelectableItems NativeLanguageSupport_Group
149+
start /wait vs_installer.exe /passive /norestart /NoRefresh /InstallSelectableItems NativeLanguageSupport_Group
149150
if %errorlevel% == 0 (
150151
echo Install Visual Studio 2015 success!
151152
) else (
@@ -158,7 +159,7 @@ goto :eof
158159
:: ===== start step 5: CUDA 10 =====
159160
:cuda10
160161
echo ">>>>>>>> step [5/7]: CUDA 10.2"
161-
nvcc --version | findstr /C:"10.2" > nul 2> nul || call :install_cuda
162+
cmd /C nvcc --version 2> nul | findstr /C:"10.2" > nul 2> nul || call :install_cuda
162163
goto java-jre
163164

164165
:install_cuda
@@ -178,9 +179,9 @@ del cuda_installer.exe
178179
echo Download cudnn from "https://paddle-ci.gz.bcebos.com/window_requirement/cudnn-10.2-windows10-x64-v7.6.5.32.zip"
179180
wget -O cudnn-10.2-windows10-x64-v7.6.5.32.zip "https://paddle-ci.gz.bcebos.com/window_requirement/cudnn-10.2-windows10-x64-v7.6.5.32.zip"
180181
tar xf cudnn-10.2-windows10-x64-v7.6.5.32.zip
181-
xcopy "cuda\bin\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin"
182-
xcopy "cuda\include\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include"
183-
xcopy "cuda\lib\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\lib"
182+
xcopy /E /Y /R "cuda\bin\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin"
183+
xcopy /E /Y /R "cuda\include\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include"
184+
xcopy /E /Y /R "cuda\lib\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\lib"
184185
rd /s /q cuda
185186
del cudnn-10.2-windows10-x64-v7.6.5.32.zip
186187
goto :eof
@@ -189,7 +190,7 @@ goto :eof
189190
:: ===== start step 6: java jre =====
190191
:java-jre
191192
echo ">>>>>>>> step [6/7]: java jre"
192-
java > nul 2> nul || call :install_java
193+
cmd /C java -version > nul 2> nul || call :install_java
193194
goto xly-agent
194195

195196
:install_java
@@ -212,5 +213,6 @@ goto :eof
212213
:xly-agent
213214
echo ">>>>>>>> step [7/7]: xly agent"
214215
wget -O agent.jar "https://paddle-ci.gz.bcebos.com/window_requirement/agent.jar"
215-
goto :eof
216-
:: ===== end step 8: xly agent =====
216+
:: ===== end step 8: xly agent =====
217+
218+
pause

0 commit comments

Comments
 (0)