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
149150if %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
160161echo " >>>>>>>> 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
162163goto java-jre
163164
164165:install_cuda
@@ -178,9 +179,9 @@ del cuda_installer.exe
178179echo Download cudnn from " https://paddle-ci.gz.bcebos.com/window_requirement/cudnn-10.2-windows10-x64-v7.6.5.32.zip"
179180wget -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"
180181tar 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"
184185rd /s /q cuda
185186del cudnn-10.2-windows10-x64-v7.6.5.32.zip
186187goto :eof
@@ -189,7 +190,7 @@ goto :eof
189190:: ===== start step 6: java jre =====
190191:java-jre
191192echo " >>>>>>>> step [6/7]: java jre"
192- java > nul 2 > nul || call :install_java
193+ cmd /C java -version > nul 2 > nul || call :install_java
193194goto xly-agent
194195
195196:install_java
@@ -212,5 +213,6 @@ goto :eof
212213:xly-agent
213214echo " >>>>>>>> step [7/7]: xly agent"
214215wget -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