Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
28554c3f
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
28554c3f
编写于
8月 24, 2020
作者:
Z
Zhou Wei
提交者:
GitHub
8月 24, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add --user for pip (#26440)
上级
ebf9b212
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
42 addition
and
31 deletion
+42
-31
paddle/scripts/paddle_build.bat
paddle/scripts/paddle_build.bat
+42
-31
未找到文件。
paddle/scripts/paddle_build.bat
浏览文件 @
28554c3f
...
...
@@ -28,21 +28,24 @@ rem ------initialize the virtual environment------
if
not
defined
PYTHON_ROOT
set
PYTHON_ROOT
=
C
:\Python37
set
PATH
=
%PYTHON_ROOT%
;
%PYTHON_ROOT%
\Scripts
;
%PATH%
set
PYTHON_EXECUTABLE
=
%PYTHON_ROOT%
\python.exe
%PYTHON_EXECUTABLE%
-m
pip
install
virtualenv
%PYTHON_EXECUTABLE%
-m
virtualenv
paddle_winci
call
paddle_winci
\Scripts\activate.bat
rem ToDo: virtual environment can't be deleted safely, some process not exit when task is canceled
rem Now use system python environment temporarily
rem set PYTHON_EXECUTABLE=%PYTHON_ROOT%\python.exe
rem %PYTHON_EXECUTABLE% -m pip install virtualenv
rem %PYTHON_EXECUTABLE% -m virtualenv paddle_winci
rem call paddle_winci\Scripts\activate.bat
rem ------pre install requirement----------
where
python
where
pip
pip
install
--upgrade
pip
pip
install
wheel
pip
install
gym
pip
install
-U -r
%work_dir%
\python\requirements.txt
pip
install
--upgrade
pip
--user
pip
install
wheel
--user
pip
install
gym
--user
pip
install
-U -r
%work_dir%
\python\requirements.txt
--user
if
%ERRORLEVEL%
NEQ
0
(
call
paddle_winci
\Scripts\deactivate.bat
exit
/b
%ERRORLEVEL%
call
paddle_winci
\Scripts\deactivate.bat
2
>
NUL
echo
pip
install
requirements
.txt
failed
!
exit
/b
7
)
rem ------initialize common variable------
...
...
@@ -127,9 +130,9 @@ cmake .. -G "Visual Studio 14 2015 Win64" -DWITH_AVX=%WITH_AVX% -DWITH_GPU=%WITH
goto
:eof
:cmake
_error
call
paddle_winci
\Scripts\deactivate.bat
call
paddle_winci
\Scripts\deactivate.bat
2
>
NUL
echo
Cmake
failed
,
will
exit
!
exit
/b
1
exit
/b
7
rem ---------------------------------------------------------------------------------------------
:build
...
...
@@ -140,12 +143,12 @@ call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd6
set
build_times
=
1
:build
_tp
echo
Build
third_party
the
%build_times%
time
:
msbuild
/m /p
:Configuration
=
Release
/verbosity
:
quiet
third_party
.vcxproj
echo
Build
third_party
for
%build_times%
time
:
msbuild
/m /p
:Configuration
=
Release
/verbosity
:
minimal
third_party
.vcxproj
if
%ERRORLEVEL%
NEQ
0
(
set
/a
build_times
=
%build_times%
+
1
if
%build_times%
GTR
3
(
exit
/b
1
exit
/b
7
)
else
(
echo
Build
third_party
failed
,
will
retry
!
goto
:build
_tp
...
...
@@ -155,12 +158,12 @@ echo Build third_party successfully!
set
build_times
=
1
:build
_paddle
echo
Build
Paddle
the
%build_times%
time
:
msbuild
/m /p
:Configuration
=
Release
/verbosity
:
minimal
paddle
.sln
echo
Build
Paddle
for
%build_times%
time
:
msbuild
/m /p
:Configuration
=
Release
/verbosity
:
quiet
paddle
.sln
if
%ERRORLEVEL%
NEQ
0
(
set
/a
build_times
=
%build_times%
+
1
if
%build_times%
GTR
2
(
exit
/b
1
exit
/b
7
)
else
(
echo
Build
Paddle
failed
,
will
retry
!
goto
:build
_paddle
...
...
@@ -170,7 +173,7 @@ echo Build Paddle successfully!
goto
:eof
:build
_error
call
paddle_winci
\Scripts\deactivate.bat
call
paddle_winci
\Scripts\deactivate.bat
2
>
NUL
echo
Build
Paddle
failed
,
will
exit
!
exit
/b
7
...
...
@@ -182,16 +185,21 @@ echo ========================================
dir
/s /b
python
\dist\
*
.whl
>
whl_file
.txt
set
/p
PADDLE_WHL_FILE_WIN
=<
whl_file
.txt
pip
install
-U
%PADDLE_WHL_FILE_WIN%
if
%ERRORLEVEL%
NEQ
0
exit
/b
%ERRORLEVEL%
pip
uninstall
-y
paddlepaddle
pip
uninstall
-y
paddlepaddle
-gpu
pip
install
-U
%PADDLE_WHL_FILE_WIN%
--user
if
%ERRORLEVEL%
NEQ
0
(
call
paddle_winci
\Scripts\deactivate.bat
2
>
NUL
echo
pip
install
whl
package
failed
!
exit
/b
3
)
echo
import
paddle
.fluid
;
print
(
paddle
.__version__
)
>
test_whl
.py
python
test_whl
.py
python
%work_dir%
\paddle\scripts\installation_validate.py
goto
:eof
:test
_whl_pacakage_error
call
paddle_winci
\Scripts\deactivate.bat
echo
Pip
install
whl
packag
e
failed
,
will
exit
!
call
paddle_winci
\Scripts\deactivate.bat
2
>
NUL
echo
Test
import
paddl
e
failed
,
will
exit
!
exit
/b
3
rem ---------------------------------------------------------------------------------------------
...
...
@@ -208,11 +216,11 @@ dir %THIRD_PARTY_PATH:/=\%\install\mkldnn\bin
dir
%THIRD
_PARTY_PATH:/
=
\
%
\install\warpctc\bin
set
PATH
=
%THIRD
_PARTY_PATH:/
=
\
%
\install\openblas\lib
;
%THIRD
_PARTY_PATH:/
=
\
%
\install\openblas\bin
;
%THIRD
_PARTY_PATH:/
=
\
%
\install\zlib\bin
;
%THIRD
_PARTY_PATH:/
=
\
%
\install\mklml\lib
;
%THIRD
_PARTY_PATH:/
=
\
%
\install\mkldnn\bin
;
%THIRD
_PARTY_PATH:/
=
\
%
\install\warpctc\bin
;
%PATH%
ctest
.exe
--output-on-failure -C
Release
-j
7
ctest
.exe
--output-on-failure -C
Release
-j
8
goto
:eof
:unit
_test_error
call
paddle_winci
\Scripts\deactivate.bat
call
paddle_winci
\Scripts\deactivate.bat
2
>
NUL
echo
Running
unit
tests
failed
,
will
exit
!
exit
/b
8
...
...
@@ -228,7 +236,7 @@ cd %work_dir%\paddle\fluid\inference\api\demo_ci
goto
:eof
:test
_inference_error
call
paddle_winci
\Scripts\deactivate.bat
s
call
paddle_winci
\Scripts\deactivate.bat
2
>
NUL
echo
Testing
fluid
library
for
inference
failed
!
exit
/b
5
...
...
@@ -303,8 +311,8 @@ echo git checkout -f origin_pr >> check_change_of_unittest.sh
goto
:eof
:check
_change_of_unittest_error
call
paddle_winci
\Scripts\deactivate.bat
exit
/b
6
call
paddle_winci
\Scripts\deactivate.bat
2
>
NUL
exit
/b
1
rem ---------------------------------------------------------------------------------------------
...
...
@@ -322,7 +330,10 @@ taskkill /f /im git-remote-https.exe 2>NUL
taskkill
/f /im
vctip
.exe
2
>
NUL
taskkill
/f /im
cvtres
.exe
2
>
NUL
taskkill
/f /im
rc
.exe
2
>
NUL
call
paddle_winci
\Scripts\deactivate.bat
taskkill
/f /im
%cd%
\paddle\fluid\pybind\Release\op_function_generator.exe
2
>
NUL
taskkill
/f /im
python
.exe
2
>
NUL
call
paddle_winci
\Scripts\deactivate.bat
2
>
NUL
taskkill
/f /im
python
.exe
2
>
NUL
echo
Windows
CI
run
successfully
!
exit
/b
0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录