Skip to content

Commit d2871fd

Browse files
p-wysockimmikolajczjiwaszkiilya-lavrenov
authored
[PyOV] Enable Python 3.10 on Azure CI (#12578)
* Fix mypy for numpy==1.21.6 * Apply CR changes * Allow Python 3.6 for open source * Attempt to silence mypy * Revert to 3.6 in setup.pys * Fix merge conflict * Add newline * Fix Python version assert * Test Python 3.10 CI * Try bumping up pybind to 2.10 * Link default python to python 3.10 * Add sudo to changing default python * Bump python version in setupvars * Fix exception in test * Do the same for compatibility * Apply same CI changes to other pipelines * Attempt to fix arm and windows CIs * Fix win py lib version and links? * Try to fix CI * Fix win python path * Update win path * Test disable PDPD * Disable TF for testing CI * Add sudo to rm * Test linux * Update requirements * RM sudo * Add debug step to CI on ARM * build py from source on linux * Remove debug step from ARM * Fix err * Fill num_proc * Fic py installation * Bump pdpd to 2.3.1 * Bump np vers * Try to upgrade onnx to 1.12.0 * Revert onnx upgrade, enable frontends * Build py shared * Export library * activate py env * Bump scipy for py3.10 * Another scipy bump * Fix Windows path, add nfs helper for mount * Attempt to fix win_cc * Batch of changes * Try to fix ngraph-onnx-lin * Install lsb-release for docker on ngraph-onnx-lin * Link lsb_release * Try bumping Ubuntu to 22.04 * Revert ubuntu change in dockerfile * Refactor tests for onnx1.12 * Fix ONNX compatibility and numpy warnings * Refactor tests for onnx1.12 * Fix ONNX compatibility and numpy warnings * Upgrade ONNX to 1.12 in cpp * Skip unsupported ops * Revert "Fix ONNX compatibility and numpy warnings" This reverts commit cd8a0e6. * Small changes * Remove unnecessary changes * Bump Python version in github workflows * Fix flake error * Another flake error * Even more flake errors * Xfail more tests * Fix mypy errors * Change onnx version in tests * Bump ONNX in MO * Fix onnx utils in comp * Minor changes * Import pathlib * Add xfails to compatibility tests * Skip segfaulting tests * Fix onnx nametuple * Fix flake * Try to fix py3.6 onnx * Switch to venv in windows * Fix model importer and reqs * Add __test__ * Debug print * Fix flake * Update linux.yml * Update windows.yml * Update linux.yml * Update windows.yml * Install python3.10 * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Update windows.yml * Install py embedded * Fix dir * Fix curl * Add complete file * CP file * Bump py ver * Fix missing venv * Try to install * Disable venv * Bump OMZ commit * checkout omz * Revert omz * Bump omz * Revert pybind bump * Update .gitmodules * Change pybind to fork * change ssize_t to size_t * Install bz2 for py build * Bump omz * Bump pandas requirement version * Revert omz * Install missing clang * Bump omz * Bump versions on fork * Bump numpy in model zoo * Fix clang * Skip segfaulting pdpd test * Skip another pdpd test * Skip pdpd places.cpp * Bump py ver in setupvars.bat * Disable paddle tests * Use int instead of str * Fix requirements path * Enable lin-cc * Fixes in CI * lin-cc and ngrpah-onnx changes * Update num_proc * Update ngraph-onnx * Minor change * Fix env var * Change ubuntu to 20 * Get compiler on ngraph-onnx * Add sudo to apt-get * Add SSL * Download ssl * Different way of installing ssl * Minor changes * install zlib * Fix env var * Fix docker building error * Revert changes * Modify dockerfile * Change pychecks python version * Cleanup * Add LayerNorm to expanded ONNX functions * Revert previous commit * Add LayerNorm to expanded ONNX functions * Apply clang * Move LayerNorm tests to skip_segfault * Unskip pdpd tests * Enable pdpd tests on linux * Refactoring * Remove 3.6 from reqs * Refactoring * Minor changes * Minor changes * Relax MO reqs * Bump torch version * relax pytest * Specify pytest version * Fix pytest pip conflict * Bump pybind11 to v2.10.1 release tag * Specify separate pytest version for py3.10 * Bump attrs * Add py dependency * Refactor versions * Add venv activation to tf tests * Fix fdupes * Bump OMZ submodule * Remove find and replace * Change pybind to upstream fork * Set pybind to proper commit * Minor changes * Try to fix scipy * Updated exclude patterns for nlohmann json * [PyOV] Fix wheel requirements for new package versions * Specify CPU plugin versions * Bump OMZ version * Fix linter * Fix linter 2 * Fix linter 3 * Disable linter Co-authored-by: Mateusz <[email protected]> Co-authored-by: jiwaszki <[email protected]> Co-authored-by: Ilya Lavrenov <[email protected]>
1 parent b210b19 commit d2871fd

File tree

42 files changed

+293
-119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+293
-119
lines changed

.ci/azure/android_arm64.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ jobs:
6363
curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2019-06-01"
6464
whoami
6565
uname -a
66+
echo ls /usr/bin/python3.10
67+
rm -rf /usr/bin/python3
68+
sudo ln -s /usr/bin/python3.10 /usr/bin/python3
6669
echo Python3 info ; which python3 ; python3 --version
6770
echo Python info ; which python ; python --version
6871
echo Java info ; which java ; java -version

.ci/azure/linux.yml

Lines changed: 63 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
CMAKE_CPACK_GENERATOR:
6363
SAMPLES_INSTALL_DIR: $(INSTALL_DIR)/samples
6464
PYTHON_SAMPLES_INSTALL_DIR: $(SAMPLES_INSTALL_DIR)/python
65-
RUN_PREFIX: . $(SETUPVARS) -pyver 3.8 &&
65+
RUN_PREFIX: . $(SETUPVARS) -pyver 3.10 &&
6666
maxParallel: 2
6767

6868
# About 150% of total time
@@ -92,8 +92,33 @@ jobs:
9292
SHARE_DIR: /mount/cinfsshare/onnxtestdata
9393
CCACHE_DIR: $(SHARE_DIR)/ccache/master/linux
9494
CMAKE_VERSION: 3.24.0
95+
BUILD_PYTHON: $(WORK_DIR)/build_python
96+
INSTALL_PYTHON: $(INSTALL_OPENVINO)/extras/python
97+
PY_VENV: $(WORK_DIR)/.venv
98+
PYTHON_VERSION: 3.10.7
9599

96100
steps:
101+
- script: |
102+
curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2019-06-01"
103+
whoami
104+
uname -a
105+
echo Python3 info ; which python3 ; python3 --version
106+
echo Java info ; which java ; java -version
107+
echo gcc info ; which gcc ; gcc --version
108+
echo cmake info ; which cmake ; cmake --version
109+
lsb_release
110+
env
111+
cat /proc/cpuinfo
112+
cat /proc/meminfo
113+
cat /etc/fstab
114+
vmstat -s
115+
df
116+
lsblk -o NAME,HCTL,SIZE,MOUNTPOINT | grep -i "sd"
117+
free -h
118+
echo TargetBranch: $(System.PullRequest.TargetBranch)
119+
echo SourceBranch: $(Build.SourceBranch)
120+
displayName: 'System info'
121+
97122
- script: |
98123
set -e
99124
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
@@ -130,8 +155,21 @@ jobs:
130155
$(REPO_DIR)/install_build_dependencies.sh
131156
# Move jdk into contrib
132157
# 'clang' compiler is to check that samples can be built using it
133-
sudo apt --assume-yes install openjdk-11-jdk clang
158+
sudo apt --assume-yes install openjdk-11-jdk libbz2-dev clang
134159
# For opencv-python: python3-setuptools and pip upgrade
160+
wget https://www.python.org/ftp/python/"$PYTHON_VERSION"/Python-"$PYTHON_VERSION".tgz
161+
tar -xzf Python-"$PYTHON_VERSION".tgz
162+
cd Python-"$PYTHON_VERSION" || exit
163+
./configure --enable-optimizations --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
164+
make python
165+
sudo make install
166+
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
167+
/usr/local/bin/python3.10 -m venv $(PY_VENV)
168+
. $(PY_VENV)/bin/activate
169+
echo Python3 info ; which python3 ; python3 --version
170+
python3 --version
171+
python3.10 --version
172+
curl https://bootstrap.pypa.io/get-pip.py | python3
135173
python3 -m pip install --upgrade pip
136174
python3 -m pip install -r $(REPO_DIR)/src/bindings/python/src/compatibility/openvino/requirements.txt
137175
python3 -m pip install -r $(REPO_DIR)/src/bindings/python/wheel/requirements-dev.txt
@@ -194,7 +232,7 @@ jobs:
194232
-DENABLE_PYTHON=ON
195233
-DBUILD_SHARED_LIBS=$(CMAKE_BUILD_SHARED_LIBS)
196234
-DENABLE_ONEDNN_FOR_GPU=$(CMAKE_BUILD_SHARED_LIBS)
197-
-DPYTHON_EXECUTABLE=/usr/bin/python3.8
235+
-DPYTHON_EXECUTABLE=$(PY_VENV)/bin/python3.10
198236
-DENABLE_TESTS=ON
199237
-DENABLE_OV_ONNX_FRONTEND=ON
200238
-DENABLE_FASTER_BUILD=ON
@@ -234,8 +272,8 @@ jobs:
234272
inputs:
235273
cmakeArgs: >
236274
-GNinja
237-
-S $(REPO_DIR)/tests/layer_tests
238-
-B $(BUILD_LAYER_TESTS_DIR)
275+
$(REPO_DIR)/tests/layer_tests
276+
workingDirectory: $(BUILD_LAYER_TESTS_DIR)
239277

240278
- script: ninja -C $(BUILD_LAYER_TESTS_DIR)
241279
displayName: 'Build Layer Tests'
@@ -244,26 +282,24 @@ jobs:
244282
displayName: 'Remove debian dependencies'
245283
condition: eq(variables['CMAKE_CPACK_GENERATOR'], 'DEB')
246284
continueOnError: false
247-
248285
- script: cmake -DCOMPONENT=python_wheels -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_DIR)/cmake_install.cmake
249286
displayName: 'Install wheel packages'
250-
251287
- script: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_LAYER_TESTS_DIR)/cmake_install.cmake
252288
displayName: 'Install Layer Tests'
253-
254-
- script: python3 -m pip install openvino-dev --find-links=$(INSTALL_DIR)/tools
289+
- script: |
290+
. $(PY_VENV)/bin/activate
291+
python3 -m pip install openvino-dev --find-links=$(INSTALL_DIR)/tools
255292
displayName: 'Install python wheels'
256-
257293
- script: |
258294
set -e
259295
cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -DCOMPONENT=tests -P $(BUILD_DIR)/cmake_install.cmake
260296
displayName: 'Install tests'
261-
262297
- script: ls -alR $(INSTALL_DIR)
263298
displayName: 'List install test files'
264299

265300
# Skip test_onnx/test_zoo_models and test_onnx/test_backend due to long execution time
266301
- script: |
302+
. $(PY_VENV)/bin/activate
267303
export DATA_PATH=$(MODELS_PATH)
268304
export MODELS_PATH=$(MODELS_PATH)
269305
# because of static build libgna is needed for python binary
@@ -277,6 +313,7 @@ jobs:
277313
278314
# Skip test_onnx/test_zoo_models and test_onnx/test_backend due to long execution time
279315
- script: |
316+
. $(PY_VENV)/bin/activate
280317
export DATA_PATH=$(MODELS_PATH)
281318
export MODELS_PATH=$(MODELS_PATH)
282319
# because of static build libgna is needed for python binary and mock_py frontend library
@@ -294,6 +331,7 @@ jobs:
294331
continueOnError: false
295332
296333
- script: |
334+
. $(PY_VENV)/bin/activate
297335
# because of static build libgna is needed for python binary
298336
export LD_LIBRARY_PATH=$(REPO_DIR)/temp/gna_03.00.00.1815.1/linux/x64:$LD_LIBRARY_PATH
299337
python3 -m pytest -s $(INSTALL_TEST_DIR)/mo/unit_tests --junitxml=$(INSTALL_TEST_DIR)/TEST-ModelOptimizer.xml
@@ -443,17 +481,23 @@ jobs:
443481
inputs:
444482
cmakeArgs: >
445483
-GNinja
446-
-S $(REPO_DIR)/tests/samples_tests
447-
-B $(BUILD_SAMPLES_TESTS_DIR)
484+
$(REPO_DIR)/tests/samples_tests
485+
workingDirectory: $(BUILD_SAMPLES_TESTS_DIR)
448486

449-
- script: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P $(BUILD_SAMPLES_TESTS_DIR)/cmake_install.cmake
487+
- script: cmake -DCOMPONENT=tests -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
488+
workingDirectory: $(BUILD_SAMPLES_TESTS_DIR)
450489
displayName: 'Install Samples Tests'
451490

452-
- script: python3 -m pip install -r $(INSTALL_TEST_DIR)/smoke_tests/requirements.txt
491+
- script: |
492+
. $(PY_VENV)/bin/activate
493+
python3 -m pip install -r $(INSTALL_TEST_DIR)/smoke_tests/requirements.txt
494+
workingDirectory: $(INSTALL_TEST_DIR)
495+
453496
displayName: 'Install dependencies for samples smoke tests'
454497
continueOnError: false
455498
456499
- script: |
500+
. $(PY_VENV)/bin/activate
457501
export PATH=$HOME/.local/bin:$PATH
458502
export IE_APP_PATH=$(INSTALL_DIR)/samples_bin
459503
export LD_LIBRARY_PATH=$IE_APP_PATH:$LD_LIBRARY_PATH
@@ -465,6 +509,7 @@ jobs:
465509
continueOnError: false
466510
467511
- script: |
512+
. $(PY_VENV)/bin/activate
468513
python3 -m pip install -r $(LAYER_TESTS_DIR)/requirements.txt
469514
export PYTHONPATH=$(REPO_DIR)/tools/mo/:$(LAYER_TESTS_DIR):$PYTHONPATH
470515
export OV_FRONTEND_PATH=$(INSTALL_DIR)/runtime/lib/intel64
@@ -474,6 +519,7 @@ jobs:
474519
continueOnError: false
475520
476521
- script: |
522+
. $(PY_VENV)/bin/activate
477523
python3 -m pip install -r $(LAYER_TESTS_DIR)/requirements.txt
478524
export PYTHONPATH=$(REPO_DIR)/tools/mo/:$(LAYER_TESTS_DIR):$PYTHONPATH
479525
export OV_FRONTEND_PATH=$(INSTALL_DIR)/runtime/lib/intel64
@@ -483,13 +529,15 @@ jobs:
483529
continueOnError: false
484530
485531
- script: |
532+
. $(PY_VENV)/bin/activate
486533
python3 -m pip install -r $(LAYER_TESTS_DIR)/requirements.txt
487534
export PYTHONPATH=$(LAYER_TESTS_DIR):$PYTHONPATH
488535
$(RUN_PREFIX) python3 -m pytest $(LAYER_TESTS_DIR)/tensorflow_tests/test_tf_Roll.py --ir_version=10 --junitxml=$(INSTALL_TEST_DIR)/TEST-tf_Roll.xmlTEST
489536
displayName: 'TensorFlow 1 Layer Tests - Legacy FE'
490537
continueOnError: false
491538
492539
- script: |
540+
. $(PY_VENV)/bin/activate
493541
python3 -m pip install -r $(LAYER_TESTS_DIR)/requirements.txt
494542
export PYTHONPATH=$(LAYER_TESTS_DIR):$PYTHONPATH
495543
export TEST_DEVICE=CPU

.ci/azure/linux_arm64.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ jobs:
4646
system.debug: true
4747
VSTS_HTTP_RETRY: 5
4848
VSTS_HTTP_TIMEOUT: 200
49-
PYTHON_ARM_VERSION: "3.8.12"
50-
PYTHON_EXEC: "python3.8"
49+
PYTHON_ARM_VERSION: "3.10.6"
50+
PYTHON_EXEC: "python3.10"
5151
OPENVINO_ARCH: 'aarch64'
5252
NUM_PROC: 1
5353
BUILD_TYPE: Release
@@ -79,7 +79,9 @@ jobs:
7979
curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2019-06-01"
8080
whoami
8181
uname -a
82-
echo Python3 info ; which python3 ; python3 --version
82+
echo ls /usr/bin/python3.10
83+
rm -rf /usr/bin/python3
84+
sudo ln -s /usr/bin/python3.10 /usr/bin/python3 echo Python3 info ; which python3 ; python3 --version
8385
echo Python info ; which python ; python --version
8486
echo Java info ; which java ; java -version
8587
echo gcc info ; which gcc ; gcc --version
@@ -161,10 +163,10 @@ jobs:
161163
-DCMAKE_VERBOSE_MAKEFILE=ON
162164
-DCMAKE_COMPILE_WARNING_AS_ERROR=OFF
163165
-DOpenCV_DIR=$(INSTALL_OPENCV)/cmake
164-
-DPYTHON_INCLUDE_DIRS=$(INSTALL_PYTHON)/include/python3.8
165-
-DPYTHON_LIBRARY=$(INSTALL_PYTHON)/lib/libpython3.8.so
166+
-DPYTHON_INCLUDE_DIRS=$(INSTALL_PYTHON)/include/python3.10
167+
-DPYTHON_LIBRARY=$(INSTALL_PYTHON)/lib/libpython3.10.so
166168
-DENABLE_PYTHON=ON
167-
-DPYTHON_MODULE_EXTENSION=".cpython-38-x86_64-linux-gnu.so"
169+
-DPYTHON_MODULE_EXTENSION=".cpython-310-x86_64-linux-gnu.so"
168170
-DENABLE_TESTS=ON
169171
-DENABLE_DATA=OFF
170172
-DCMAKE_EXE_LINKER_FLAGS=-Wl,-rpath-link,$(INSTALL_OPENCV)/lib
@@ -207,10 +209,10 @@ jobs:
207209
-DOpenVINODeveloperPackage_DIR=$(BUILD_OPENVINO)
208210
-DENABLE_PYTHON=ON
209211
-DTHREADING=TBB
210-
-DPYTHON_EXECUTABLE=$(INSTALL_PYTHON)/bin/python3.8
211-
-DPYTHON_INCLUDE_DIRS=$(INSTALL_PYTHON)/include/python3.8
212+
-DPYTHON_EXECUTABLE=$(INSTALL_PYTHON)/bin/python3.10
213+
-DPYTHON_INCLUDE_DIRS=$(INSTALL_PYTHON)/include/python3.10
212214
-DPYTHON_LIBRARIES=$(INSTALL_PYTHON)/lib
213-
-DPYTHON3_NUMPY_INCLUDE_DIRS=/usr/local/lib/python3.8/site-packages/numpy/core/include
215+
-DPYTHON3_NUMPY_INCLUDE_DIRS=/usr/local/lib/python3.10/site-packages/numpy/core/include
214216
-DPYTHON_MODULE_EXTENSION=".so"
215217
-DPYBIND11_FINDPYTHON=OFF
216218
-DPYBIND11_NOPYTHON=OFF
@@ -248,8 +250,8 @@ jobs:
248250
-GNinja
249251
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
250252
-DENABLE_PYTHON=ON
251-
-DPYTHON_EXECUTABLE=/usr/local/bin/python3.8
252-
-DPYTHON_INCLUDE_DIR=$(INSTALL_PYTHON)/include/python3.8
253+
-DPYTHON_EXECUTABLE=/usr/local/bin/python3.10
254+
-DPYTHON_INCLUDE_DIR=$(INSTALL_PYTHON)/include/python3.10
253255
-DPYTHON_LIBRARY=$(INSTALL_PYTHON)/lib
254256
-DCMAKE_TOOLCHAIN_FILE=$(OPENVINO_REPO_DIR)/cmake/arm64.toolchain.cmake
255257
-DOpenVINO_DIR=$(BUILD_OPENVINO)

.ci/azure/linux_conditional_compilation.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,19 @@ jobs:
7979
- script: |
8080
set -e
8181
$(REPO_DIR)/install_build_dependencies.sh
82+
wget https://www.python.org/ftp/python/3.10.6/Python-3.10.6.tgz
83+
tar -xzf Python-3.10.6.tgz
84+
cd Python-3.10.6 || exit
85+
./configure --enable-optimizations --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
86+
make -j 1 python
87+
sudo make -j 1 install
88+
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
89+
/usr/local/bin/python3.10 -m venv $(WORK_DIR)/.venv
90+
. $(WORK_DIR)/.venv/bin/activate
91+
echo Python3 info ; which python3 ; python3 --version
92+
python3 --version
93+
python3.10 --version
94+
curl https://bootstrap.pypa.io/get-pip.py | python3
8295
python3 -m pip install -r $(REPO_DIR)/src/bindings/python/src/compatibility/openvino/requirements.txt
8396
# Speed up build
8497
wget https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-linux.zip
@@ -97,6 +110,7 @@ jobs:
97110
-DENABLE_FASTER_BUILD=ON
98111
-DENABLE_PROFILING_ITT=ON
99112
-DSELECTIVE_BUILD=COLLECT
113+
-DPYTHON_EXECUTABLE=$(WORK_DIR)/.venv/bin/python3.10
100114
$(REPO_DIR)
101115
workingDirectory: $(BUILD_DIR)
102116

.ci/azure/linux_coverity.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ jobs:
3535
curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2019-06-01"
3636
whoami
3737
uname -a
38+
echo ls /usr/bin/python3.10
39+
rm -rf /usr/bin/python3
40+
sudo ln -s /usr/bin/python3.10 /usr/bin/python3
3841
echo Python3 info ; which python3 ; python3 --version
3942
echo Python info ; which python ; python --version
4043
echo Java info ; which java ; java -version

.ci/azure/linux_ngraph_onnx.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ jobs:
8080
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
8181
sudo mkdir -p $(MODELS_DIR)
8282
sudo apt --assume-yes update && sudo apt --assume-yes install nfs-common
83+
sudo apt install nfs-common -y
8384
sudo mount -vvv -t nfs cinfsshare.file.core.windows.net:/cinfsshare/onnxtestdata $(MODELS_DIR) -o vers=4,minorversion=1,sec=sys
8485
mkdir -p $(MODELS_DIR)/models_data
8586
displayName: 'Make dirs'
@@ -92,17 +93,36 @@ jobs:
9293

9394
- script: |
9495
set -e
96+
apt-get update && apt-get install -y lsb-release && apt-get clean all
97+
sudo apt-get -y install libssl-dev zlib1g-dev
98+
sudo apt-get -y install build-essential
99+
wget https://www.python.org/ftp/python/3.10.7/Python-3.10.7.tgz
100+
tar -xzf Python-3.10.7.tgz
101+
cd Python-3.10.7 || exit
102+
./configure --enable-optimizations --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
103+
make python
104+
sudo make install
105+
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
106+
/usr/local/bin/python3.10 -m venv $(WORK_DIR)/.venv
107+
. $(WORK_DIR)/.venv/bin/activate
108+
echo Python3 info ; which python3 ; python3 --version
109+
python3 --version
110+
python3.10 --version
111+
curl https://bootstrap.pypa.io/get-pip.py | python3
95112
sudo apt --assume-yes install git-lfs uidmap
96113
curl -fsSL https://get.docker.com -o get-docker.sh
97114
sudo sh get-docker.sh
98115
workingDirectory: $(WORK_DIR)
99116
displayName: 'Install dependencies'
100117
101-
- script: src/bindings/python/tests/test_onnx/model_zoo_preprocess.sh -d $(MODELS_DIR)/models_data -o -s "$(ONNX_MODEL_ZOO_SHA)"
118+
- script:
119+
. $(WORK_DIR)/.venv/bin/activate
120+
src/bindings/python/tests/test_onnx/model_zoo_preprocess.sh -d $(MODELS_DIR)/models_data -o -s "$(ONNX_MODEL_ZOO_SHA)"
102121
displayName: 'Update models'
103122
condition: ne(variables['BUILD_TYPE'], 'Debug')
104123

105-
- script: sudo docker build --tag=openvino-onnx-ci-image --file=.ci/openvino-onnx/Dockerfile --build-arg BUILD_TYPE=$(BUILD_TYPE) --build-arg PROTOBUF_LITE=$(PROTOBUF_LITE) .
124+
- script:
125+
sudo docker build --tag=openvino-onnx-ci-image --file=.ci/openvino-onnx/Dockerfile --build-arg BUILD_TYPE=$(BUILD_TYPE) --build-arg PROTOBUF_LITE=$(PROTOBUF_LITE) .
106126
displayName: 'Docker build $(BUILD_TYPE)'
107127

108128
- script: sudo fallocate -l 64G /swapfile ; sudo mkswap /swapfile ; sudo swapon /swapfile ; df ; free -h

0 commit comments

Comments
 (0)