Update demo .bat scripts (#6096)
* Change the build dir for cpp samples * Add info about `-sample-options` to the help message * Use `python -m pip` instead of `pip3` * Add the line of code to update pip * Update help messages * Add python venv creation * Use `model-optimizer/requirements.txt` instead of `install_prerequisites.bat` * [demo_benchmark_app.bat] Update the help message * [demo_benchmark_app.bat] Add venv creation * [demo_benchmark_app.bat] Replace model_optimizer prerequisites with the requirements.txt * Change the venv location * Remove the mention of FPGA from the help message * Fix venv folder path * Change venv folder to `venv_openvino`
This commit is contained in:
1 parent
860896c4bb
commit
be947a0b5d
3 files changed
+66
-16
No files matched your search
@@ -6,6 +6,7 @@ setlocal enabledelayedexpansion
|
||||
|
||||
set TARGET=CPU
|
||||
set BUILD_FOLDER=%USERPROFILE%\Documents\Intel\OpenVINO
|
||||
set VENV_DIR=%USERPROFILE%\Documents\Intel\OpenVINO\venv_openvino
|
||||
|
||||
:: command line arguments parsing
|
||||
:input_arguments_loop
|
||||
@@ -21,10 +22,12 @@ if not "%1"=="" (
|
||||
shift
|
||||
)
|
||||
if "%1"=="-help" (
|
||||
echo %~n0%~x0 is benchmark demo using public SqueezeNet topology
|
||||
echo Benchmark demo using public SqueezeNet topology
|
||||
echo.
|
||||
echo Options:
|
||||
echo -d name Specify the target device to infer on; CPU, GPU, FPGA, HDDL or MYRIAD are acceptable. Sample will look for a suitable plugin for device specified
|
||||
echo -help Print help message
|
||||
echo -d DEVICE Specify the target device to infer on; CPU, GPU, HDDL or MYRIAD are acceptable. Sample will look for a suitable plugin for device specified
|
||||
echo -sample-options OPTIONS Specify command line arguments for the sample
|
||||
exit /b
|
||||
)
|
||||
shift
|
||||
@@ -88,7 +91,21 @@ if not "%python_ver%"=="okay" (
|
||||
)
|
||||
|
||||
:: install yaml python modules required for downloader.py
|
||||
pip3 install --user -r "%ROOT_DIR%..\open_model_zoo\tools\downloader\requirements.in"
|
||||
if exist "%VENV_DIR%" (
|
||||
echo.
|
||||
echo ###############^|^| Using the existing python virtual environment ^|^|###############
|
||||
echo.
|
||||
) else (
|
||||
echo.
|
||||
echo ###############^|^| Creating the python virtual environment ^|^|###############
|
||||
echo.
|
||||
python -m venv "%VENV_DIR%"
|
||||
)
|
||||
|
||||
call "%VENV_DIR%\Scripts\activate.bat"
|
||||
python -m pip install -U pip
|
||||
python -m pip install -r "%ROOT_DIR%..\open_model_zoo\tools\downloader\requirements.in"
|
||||
|
||||
if ERRORLEVEL 1 GOTO errorHandling
|
||||
|
||||
set downloader_dir=%INTEL_OPENVINO_DIR%\deployment_tools\open_model_zoo\tools\downloader
|
||||
@@ -121,8 +138,8 @@ echo.
|
||||
echo ###############^|^| Install Model Optimizer prerequisites ^|^|###############
|
||||
echo.
|
||||
CALL :delay 3
|
||||
cd /d "%INTEL_OPENVINO_DIR%\deployment_tools\model_optimizer\install_prerequisites"
|
||||
call install_prerequisites_caffe.bat
|
||||
cd /d "%INTEL_OPENVINO_DIR%\deployment_tools\model_optimizer"
|
||||
python -m pip install -r requirements.txt
|
||||
if ERRORLEVEL 1 GOTO errorHandling
|
||||
|
||||
CALL :delay 7
|
||||
@@ -209,7 +226,7 @@ if "!MSBUILD_BIN!" == "" (
|
||||
GOTO errorHandling
|
||||
)
|
||||
|
||||
set "SOLUTION_DIR64=%BUILD_FOLDER%\inference_engine_samples_build"
|
||||
set "SOLUTION_DIR64=%BUILD_FOLDER%\inference_engine_cpp_samples_build"
|
||||
|
||||
echo Creating Visual Studio !MSBUILD_VERSION! %PLATFORM% files in %SOLUTION_DIR64%... && ^
|
||||
if exist "%SOLUTION_DIR64%\CMakeCache.txt" del "%SOLUTION_DIR64%\CMakeCache.txt"
|
||||
|
||||
@@ -7,6 +7,7 @@ setlocal enabledelayedexpansion
|
||||
set TARGET=CPU
|
||||
set SAMPLE_OPTIONS=
|
||||
set BUILD_FOLDER=%USERPROFILE%\Documents\Intel\OpenVINO
|
||||
set VENV_DIR=%USERPROFILE%\Documents\Intel\OpenVINO\venv_openvino
|
||||
|
||||
:: command line arguments parsing
|
||||
:input_arguments_loop
|
||||
@@ -22,10 +23,12 @@ if not "%1"=="" (
|
||||
shift
|
||||
)
|
||||
if "%1"=="-help" (
|
||||
echo %~n0%~x0 is security barrier camera demo that showcases three models coming with the product
|
||||
echo Security barrier camera demo that showcases three models coming with the product
|
||||
echo.
|
||||
echo Options:
|
||||
echo -d name Specify the target device to infer on; CPU, GPU, FPGA, HDDL or MYRIAD are acceptable. Sample will look for a suitable plugin for device specified
|
||||
echo -help Print help message
|
||||
echo -d DEVICE Specify the target device to infer on; CPU, GPU, HDDL or MYRIAD are acceptable. Sample will look for a suitable plugin for device specified
|
||||
echo -sample-options OPTIONS Specify command line arguments for the sample
|
||||
exit /b
|
||||
)
|
||||
shift
|
||||
@@ -78,9 +81,22 @@ if not "%python_ver%"=="okay" (
|
||||
)
|
||||
|
||||
:: install yaml python modules required for downloader.py
|
||||
pip3 install --user -r "%ROOT_DIR%..\open_model_zoo\tools\downloader\requirements.in"
|
||||
if ERRORLEVEL 1 GOTO errorHandling
|
||||
if exist "%VENV_DIR%" (
|
||||
echo.
|
||||
echo ###############^|^| Using the existing python virtual environment ^|^|###############
|
||||
echo.
|
||||
) else (
|
||||
echo.
|
||||
echo ###############^|^| Creating the python virtual environment ^|^|###############
|
||||
echo.
|
||||
python -m venv "%VENV_DIR%"
|
||||
)
|
||||
|
||||
call "%VENV_DIR%\Scripts\activate.bat"
|
||||
python -m pip install -U pip
|
||||
python -m pip install -r "%ROOT_DIR%..\open_model_zoo\tools\downloader\requirements.in"
|
||||
|
||||
if ERRORLEVEL 1 GOTO errorHandling
|
||||
|
||||
set models_path=%BUILD_FOLDER%\openvino_models\ir
|
||||
set models_cache=%BUILD_FOLDER%\openvino_models\cache
|
||||
|
||||
@@ -6,6 +6,7 @@ setlocal enabledelayedexpansion
|
||||
|
||||
set TARGET=CPU
|
||||
set BUILD_FOLDER=%USERPROFILE%\Documents\Intel\OpenVINO
|
||||
set VENV_DIR=%USERPROFILE%\Documents\Intel\OpenVINO\venv_openvino
|
||||
|
||||
:: command line arguments parsing
|
||||
:input_arguments_loop
|
||||
@@ -21,10 +22,12 @@ if not "%1"=="" (
|
||||
shift
|
||||
)
|
||||
if "%1"=="-help" (
|
||||
echo %~n0%~x0 is classification demo using public SqueezeNet topology
|
||||
echo Classification demo using public SqueezeNet topology
|
||||
echo.
|
||||
echo Options:
|
||||
echo -d name Specify the target device to infer on; CPU, GPU, FPGA, HDDL or MYRIAD are acceptable. Sample will look for a suitable plugin for device specified
|
||||
echo -help Print help message
|
||||
echo -d DEVICE Specify the target device to infer on; CPU, GPU, HDDL or MYRIAD are acceptable. Sample will look for a suitable plugin for device specified
|
||||
echo -sample-options OPTIONS Specify command line arguments for the sample
|
||||
exit /b
|
||||
)
|
||||
shift
|
||||
@@ -84,7 +87,21 @@ if not "%python_ver%"=="okay" (
|
||||
)
|
||||
|
||||
:: install yaml python modules required for downloader.py
|
||||
pip3 install --user -r "%ROOT_DIR%..\open_model_zoo\tools\downloader\requirements.in"
|
||||
if exist "%VENV_DIR%" (
|
||||
echo.
|
||||
echo ###############^|^| Using the existing python virtual environment ^|^|###############
|
||||
echo.
|
||||
) else (
|
||||
echo.
|
||||
echo ###############^|^| Creating the python virtual environment ^|^|###############
|
||||
echo.
|
||||
python -m venv "%VENV_DIR%"
|
||||
)
|
||||
|
||||
call "%VENV_DIR%\Scripts\activate.bat"
|
||||
python -m pip install -U pip
|
||||
python -m pip install -r "%ROOT_DIR%..\open_model_zoo\tools\downloader\requirements.in"
|
||||
|
||||
if ERRORLEVEL 1 GOTO errorHandling
|
||||
|
||||
set downloader_dir=%INTEL_OPENVINO_DIR%\deployment_tools\open_model_zoo\tools\downloader
|
||||
@@ -117,8 +134,8 @@ echo.
|
||||
echo ###############^|^| Install Model Optimizer prerequisites ^|^|###############
|
||||
echo.
|
||||
CALL :delay 3
|
||||
cd /d "%INTEL_OPENVINO_DIR%\deployment_tools\model_optimizer\install_prerequisites"
|
||||
call install_prerequisites_caffe.bat
|
||||
cd /d "%INTEL_OPENVINO_DIR%\deployment_tools\model_optimizer"
|
||||
python -m pip install -r requirements.txt
|
||||
if ERRORLEVEL 1 GOTO errorHandling
|
||||
|
||||
CALL :delay 7
|
||||
@@ -205,7 +222,7 @@ if "!MSBUILD_BIN!" == "" (
|
||||
GOTO errorHandling
|
||||
)
|
||||
|
||||
set "SOLUTION_DIR64=%BUILD_FOLDER%\inference_engine_samples_build"
|
||||
set "SOLUTION_DIR64=%BUILD_FOLDER%\inference_engine_cpp_samples_build"
|
||||
|
||||
echo Creating Visual Studio !MSBUILD_VERSION! %PLATFORM% files in %SOLUTION_DIR64%... && ^
|
||||
if exist "%SOLUTION_DIR64%\CMakeCache.txt" del "%SOLUTION_DIR64%\CMakeCache.txt"
|
||||
|
||||
Reference in new issue
Block a user