未验证 提交 63e2a7dd 编写于 作者: S Sing_chan 提交者: GitHub

make paddle build and unit test in python virtual environment. (#43620)

上级 f12cb756
......@@ -92,15 +92,18 @@ rem ------initialize set git config------
git config --global core.longpaths true
rem ------initialize the python environment------
set PYTHON_EXECUTABLE=%PYTHON_ROOT%\python.exe
set PATH=%PYTHON_ROOT%\Scripts;%PYTHON_ROOT%;%PATH%
set PYTHON_VENV_ROOT=%cache_dir%\python_venv
set PYTHON_EXECUTABLE=!PYTHON_VENV_ROOT!\Scripts\python.exe
%PYTHON_ROOT%\python.exe -m venv --clear !PYTHON_VENV_ROOT!
call !PYTHON_VENV_ROOT!\Scripts\activate.bat
if "%WITH_PYTHON%" == "ON" (
where python
where pip
pip install wheel --user
pip install pyyaml --user
pip install wget --user
pip install -r %work_dir%\python\requirements.txt --user
pip install wheel
pip install pyyaml
pip install wget
pip install -r %work_dir%\python\requirements.txt
if !ERRORLEVEL! NEQ 0 (
echo pip install requirements.txt failed!
exit /b 5
......@@ -632,7 +635,7 @@ set /p PADDLE_WHL_FILE_WIN=< whl_file.txt
@ECHO ON
pip uninstall -y paddlepaddle
pip uninstall -y paddlepaddle-gpu
pip install %PADDLE_WHL_FILE_WIN% --user
pip install %PADDLE_WHL_FILE_WIN%
if %ERRORLEVEL% NEQ 0 (
call paddle_winci\Scripts\deactivate.bat 2>NUL
echo pip install whl package failed!
......@@ -659,7 +662,7 @@ echo ========================================
: set CI_SKIP_CPP_TEST if only *.py changed
git diff --name-only %BRANCH% | findstr /V "\.py" || set CI_SKIP_CPP_TEST=ON
pip install -r %work_dir%\python\unittest_py\requirements.txt --user
pip install -r %work_dir%\python\unittest_py\requirements.txt
if %ERRORLEVEL% NEQ 0 (
echo pip install unittest requirements.txt failed!
exit /b 5
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册