Skip to content

Commit a324f31

Browse files
committed
Perfect build compile environment script on windows, test=document_fix
1 parent e122e16 commit a324f31

File tree

1 file changed

+39
-13
lines changed

1 file changed

+39
-13
lines changed

tools/windows/build_compile_environment.bat

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
:: 2. Git 2.28.0
2525
:: 3. Python 3.7.8
2626
:: 4. Visual Studio 2015 with update 3
27-
:: 5. CUDA 10 [miss cudnn]
28-
:: 6. java jre [not complete]
29-
:: 7. xly agent [not complete]
27+
:: 5. CUDA 10
28+
:: 6. java jre
29+
:: 7. xly agent
3030

3131
:: Echo command is not required.
3232
@echo off
@@ -138,8 +138,8 @@ goto :cuda10
138138

139139
:install_visual_studio
140140
echo There is not Visual Studio in this PC, will install VS2015.
141-
echo Download package from "https://download.my.visualstudio.com/pr/en_visual_studio_professional_2015_with_update_3_x86_x64_web_installer_8922978.exe"
142-
wget -O vs_installer.exe "https://download.my.visualstudio.com/pr/en_visual_studio_professional_2015_with_update_3_x86_x64_web_installer_8922978.exe?t=9ee7a96d-ca80-4b84-af2c-7dd86996a0aa&e=1600103404&h=3cdea1e81c04aa4e846f5314972c46eb&su=1"
141+
echo Download package from "https://paddle-ci.gz.bcebos.com/window_requirement/en_visual_studio_enterprise_2015_with_update_3_x86_x64_web_installer_8922986.exe"
142+
wget -O vs_installer.exe "https://paddle-ci.gz.bcebos.com/window_requirement/en_visual_studio_enterprise_2015_with_update_3_x86_x64_web_installer_8922986.exe"
143143
echo Install Visual Studio 2015 ...
144144
:: /passive [silent install]
145145
:: /norestart [no restart]
@@ -157,34 +157,60 @@ goto :eof
157157

158158
:: ===== start step 5: CUDA 10 =====
159159
:cuda10
160-
echo ">>>>>>>> step [5/7]: CUDA 10.0"
161-
nvcc --version > nul 2> nul || call :install_cuda
160+
echo ">>>>>>>> step [5/7]: CUDA 10.2"
161+
nvcc --version | findstr /C:"10.2" > nul 2> nul || call :install_cuda
162162
goto java-jre
163163

164164
:install_cuda
165-
echo There is not CUDA in this PC, will install CUDA-10.0.
166-
echo Download package from "https://developer.download.nvidia.cn/compute/cuda/10.0/secure/Prod/network_installers/cuda_10.0.130_win10_network.exe"
167-
wget -O cuda_installer.exe "https://developer.download.nvidia.cn/compute/cuda/10.0/secure/Prod/network_installers/cuda_10.0.130_win10_network.exe?hG7oBtA2CnxZG7d39onmBdtzrIa2cOukrmW8I0qk3h36vb2Sj0yYGjMElJlxlNhjx8Xu5RlbmdBhCWvP2QcEqMjCoKCXe5lOgr5uIIso_7LqrotgQHbZRZSVBYRT4bIAHPVSPrr4_4KczKvI9Nf3mbO9RJ2Vj6ECD5QphRMJBus0KKNVxO1gsplVL5qaCnE"
168-
echo Install CUDA-10.0 ...
165+
echo There is not CUDA in this PC, will install CUDA-10.2.
166+
echo Download package from "https://paddle-ci.gz.bcebos.com/window_requirement/cuda_10.2.89_441.22_win10.exe"
167+
wget -O cuda_installer.exe "https://paddle-ci.gz.bcebos.com/window_requirement/cuda_10.2.89_441.22_win10.exe"
168+
echo Install CUDA-10.2 ...
169169
:: -s [silent install]
170170
start /wait cuda_installer.exe -s
171171
if %errorlevel% == 0 (
172-
echo Install CUDA-10.0 success!
172+
echo Install CUDA-10.2 success!
173173
) else (
174-
echo Error***** Install CUDA-10.0 failed, please re-install it manually.
174+
echo Error***** Install CUDA-10.2 failed, please re-install it manually.
175+
goto :eof
175176
)
176177
del cuda_installer.exe
178+
echo Download cudnn from "https://paddle-ci.gz.bcebos.com/window_requirement/cudnn-10.2-windows10-x64-v7.6.5.32.zip"
179+
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"
180+
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"
184+
rd /s /q cuda
185+
del cudnn-10.2-windows10-x64-v7.6.5.32.zip
177186
goto :eof
178187
:: ===== end step 5: CUDA 10 =====
179188

180189
:: ===== start step 6: java jre =====
181190
:java-jre
182191
echo ">>>>>>>> step [6/7]: java jre"
192+
java > nul 2> nul || call :install_java
183193
goto xly-agent
194+
195+
:install_java
196+
echo There is not java-jre in this PC, will install java-jre.
197+
echo Download package from "https://paddle-ci.gz.bcebos.com/window_requirement/jre-8u261-windows-i586.exe"
198+
wget -O jre-8u261-windows-x64.exe "https://paddle-ci.gz.bcebos.com/window_requirement/jre-8u261-windows-i586.exe"
199+
echo Install java-jre ...
200+
:: -s [silent install]
201+
start /wait jre-8u261-windows-x64.exe /s
202+
if %errorlevel% == 0 (
203+
echo Install java success!
204+
) else (
205+
echo Error***** Install java failed, please re-install it manually.
206+
)
207+
del jre-8u261-windows-x64.exe
208+
goto :eof
184209
:: ===== end step 6: java jre =====
185210

186211
:: ===== start step 7: xly agent =====
187212
:xly-agent
188213
echo ">>>>>>>> step [7/7]: xly agent"
214+
wget -O agent.jar "https://paddle-ci.gz.bcebos.com/window_requirement/agent.jar"
189215
goto :eof
190216
:: ===== end step 8: xly agent =====

0 commit comments

Comments
 (0)