-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,093 changed files
with
46,971 additions
and
30,508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
pr-27430 | ||
pr-27597 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
ARG REGISTRY="docker.io" | ||
FROM ${REGISTRY}/library/debian:10.13 | ||
|
||
USER root | ||
|
||
# APT configuration | ||
RUN echo 'Acquire::Retries "10";' > /etc/apt/apt.conf && \ | ||
echo 'APT::Get::Assume-Yes "true";' >> /etc/apt/apt.conf && \ | ||
echo 'APT::Get::Fix-Broken "true";' >> /etc/apt/apt.conf && \ | ||
echo 'APT::Get::no-install-recommends "true";' >> /etc/apt/apt.conf | ||
|
||
ENV DEBIAN_FRONTEND="noninteractive" \ | ||
TZ="Europe/London" | ||
|
||
RUN apt-get update && \ | ||
apt-get install \ | ||
git \ | ||
libc6-dev \ | ||
# parallel gzip | ||
pigz \ | ||
# Python | ||
python3 \ | ||
python3-pip \ | ||
python3-dev \ | ||
python3-venv \ | ||
python3-distutils \ | ||
# To build Python 3.10 from source | ||
build-essential \ | ||
libffi-dev \ | ||
libgdbm-dev \ | ||
libc6-dev \ | ||
libssl-dev \ | ||
zlib1g-dev \ | ||
libbz2-dev \ | ||
libreadline-dev \ | ||
libsqlite3-dev \ | ||
libncurses5-dev \ | ||
libncursesw5-dev \ | ||
xz-utils \ | ||
tk-dev \ | ||
libxml2-dev \ | ||
libxmlsec1-dev \ | ||
liblzma-dev \ | ||
wget \ | ||
curl \ | ||
&& \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Install openvino dependencies | ||
ADD scripts/install_dependencies/install_openvino_dependencies.sh /install_openvino_dependencies.sh | ||
RUN chmod +x /install_openvino_dependencies.sh && \ | ||
/install_openvino_dependencies.sh && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Setup Python 3.10 | ||
RUN wget https://www.python.org/ftp/python/3.10.9/Python-3.10.9.tar.xz | ||
|
||
RUN tar -xf Python-3.10.9.tar.xz && \ | ||
cd Python-3.10.9 && \ | ||
./configure --enable-optimizations && \ | ||
make -j 8 && \ | ||
make altinstall | ||
|
||
# Setup pip | ||
ENV PIP_VERSION="24.0" | ||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ | ||
python3.10 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \ | ||
rm -f get-pip.py | ||
|
||
# Use Python 3.10 as default instead of Python 3.7 | ||
# Using venv here 'cause other methods to switch the default Python on Ubuntu 20 break both system and wheels build | ||
RUN python3.10 -m venv venv | ||
ENV PATH="/venv/bin:$PATH" | ||
|
||
ENV PIP_CACHE_DIR=/mount/caches/pip/linux/${PIP_VERSION} | ||
ENV PIP_INSTALL_PATH=/venv/lib/python3.10/site-packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
.github/dockerfiles/ov_test/ubuntu_20_04_x64_py313/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
ARG REGISTRY="docker.io" | ||
FROM ${REGISTRY}/library/ubuntu:20.04 | ||
|
||
USER root | ||
|
||
# APT configuration | ||
RUN echo 'Acquire::Retries "10";' > /etc/apt/apt.conf && \ | ||
echo 'APT::Get::Assume-Yes "true";' >> /etc/apt/apt.conf && \ | ||
echo 'APT::Get::Fix-Broken "true";' >> /etc/apt/apt.conf && \ | ||
echo 'APT::Get::no-install-recommends "true";' >> /etc/apt/apt.conf | ||
|
||
ENV DEBIAN_FRONTEND="noninteractive" \ | ||
TZ="Europe/London" | ||
|
||
RUN apt-get update && \ | ||
apt-get install software-properties-common && \ | ||
add-apt-repository --yes --no-update ppa:git-core/ppa && \ | ||
add-apt-repository --yes --no-update ppa:deadsnakes/ppa && \ | ||
apt-get update && \ | ||
apt-get install \ | ||
curl \ | ||
git \ | ||
gpg-agent \ | ||
tzdata \ | ||
# parallel gzip | ||
pigz \ | ||
# Python | ||
python3.13-dev \ | ||
python3.13-venv \ | ||
&& \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Install openvino dependencies | ||
ADD scripts/install_dependencies/install_openvino_dependencies.sh /install_openvino_dependencies.sh | ||
RUN chmod +x /install_openvino_dependencies.sh && \ | ||
/install_openvino_dependencies.sh && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Setup pip | ||
ENV PIP_VERSION="24.0" | ||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ | ||
python3 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \ | ||
python3.13 get-pip.py --no-cache-dir pip==${PIP_VERSION} && \ | ||
rm -f get-pip.py | ||
|
||
# Use Python 3.13 as default instead of Python 3.8 | ||
# Using venv here 'cause other methods to switch the default Python on Ubuntu 20 break both system and wheels build | ||
RUN python3.13 -m venv venv | ||
ENV PATH="/venv/bin:$PATH" | ||
|
||
ENV PIP_CACHE_DIR=/mount/caches/pip/linux/${PIP_VERSION} | ||
ENV PIP_INSTALL_PATH=/venv/lib/python3.13/site-packages |
52 changes: 25 additions & 27 deletions
52
...flows/send_workflows_to_opentelemetry.yml → ...hub/workflows/export_workflow_metrics.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
name: Python API tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
runner: | ||
description: 'Machine on which the tests would run' | ||
type: string | ||
required: true | ||
container: | ||
description: 'JSON to be converted to the value of the "container" configuration for the job' | ||
type: string | ||
required: false | ||
default: '{"image": null}' | ||
python-version: | ||
description: 'Python version to setup. E.g., "3.11"' | ||
type: string | ||
required: true | ||
|
||
permissions: read-all | ||
|
||
env: | ||
PIP_CACHE_PATH: /mount/caches/pip/linux | ||
|
||
jobs: | ||
Python_Unit_Tests: | ||
name: Python API tests | ||
timeout-minutes: 30 | ||
runs-on: ${{ inputs.runner }} | ||
container: ${{ fromJSON(inputs.container) }} | ||
defaults: | ||
run: | ||
shell: bash | ||
env: | ||
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input | ||
OPENVINO_REPO: ${{ github.workspace }}/openvino | ||
INSTALL_DIR: ${{ github.workspace }}/install | ||
INSTALL_TEST_DIR: ${{ github.workspace }}/install/openvino_tests | ||
INSTALL_WHEELS_DIR: ${{ github.workspace }}/install/openvino_wheels | ||
steps: | ||
- name: Download OpenVINO artifacts (tarballs and wheels) | ||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||
with: | ||
pattern: openvino_@(wheels|tests) | ||
path: ${{ env.INSTALL_DIR }} | ||
|
||
# Needed as ${{ github.workspace }} is not working correctly when using Docker | ||
- name: Setup Variables | ||
run: | | ||
echo "OPENVINO_REPO=$GITHUB_WORKSPACE/openvino" >> "$GITHUB_ENV" | ||
echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV" | ||
echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/openvino_tests" >> "$GITHUB_ENV" | ||
echo "INSTALL_WHEELS_DIR=$GITHUB_WORKSPACE/install/openvino_wheels" >> "$GITHUB_ENV" | ||
- name: Install OpenVINO dependencies (mac) | ||
if: runner.os == 'macOS' | ||
run: brew install pigz | ||
|
||
- name: Extract OpenVINO packages | ||
run: pigz -dc openvino_tests.tar.gz | tar -xf - -C ${INSTALL_TEST_DIR} | ||
working-directory: ${{ env.INSTALL_TEST_DIR }} | ||
|
||
- name: Fetch setup_python and install wheels actions | ||
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | ||
with: | ||
sparse-checkout: | | ||
.github/actions/setup_python/action.yml | ||
.github/actions/install_ov_wheels/action.yml | ||
sparse-checkout-cone-mode: false | ||
path: 'action_root' | ||
|
||
- name: Setup Python ${{ inputs.python-version }} | ||
uses: ./action_root/.github/actions/setup_python | ||
with: | ||
version: ${{ inputs.python-version }} | ||
pip-cache-path: ${{ runner.os == 'Linux' && env.PIP_CACHE_PATH || '' }} | ||
should-setup-pip-paths: ${{ runner.os == 'Linux' }} | ||
self-hosted-runner: ${{ runner.os == 'Linux' }} | ||
|
||
# | ||
# Tests | ||
# | ||
- name: Install OpenVINO Python wheels | ||
uses: ./action_root/.github/actions/install_ov_wheels | ||
with: | ||
wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }} | ||
wheels-to-install: 'openvino' | ||
|
||
- name: Install Python API tests dependencies | ||
run: python3 -m pip install -r ${INSTALL_TEST_DIR}/tests/bindings/python/requirements_test.txt | ||
|
||
# | ||
# Tests | ||
# | ||
|
||
- name: Python API Tests | ||
run: | | ||
# for 'template' extension | ||
export LD_LIBRARY_PATH=${INSTALL_TEST_DIR}/tests/:$LD_LIBRARY_PATH | ||
python3 -m pytest -sv ${INSTALL_TEST_DIR}/tests/pyopenvino \ | ||
--junitxml=${INSTALL_TEST_DIR}/TEST-Pyngraph.xml \ | ||
--ignore=${INSTALL_TEST_DIR}/tests/pyopenvino/tests/test_utils/test_utils.py | ||
- name: Python API Tests -- numpy>=2.0.0 | ||
run: | | ||
python3 -m pip uninstall -y numpy | ||
python3 -m pip install "numpy~=2.0.0" | ||
python3 -m pip install -r ${INSTALL_TEST_DIR}/tests/bindings/python/requirements_test.txt | ||
# for 'template' extension | ||
export LD_LIBRARY_PATH=${INSTALL_TEST_DIR}/tests/:$LD_LIBRARY_PATH | ||
python3 -m pytest -sv ${INSTALL_TEST_DIR}/tests/pyopenvino \ | ||
--junitxml=${INSTALL_TEST_DIR}/TEST-Pyngraph_new_numpy.xml \ | ||
--ignore=${INSTALL_TEST_DIR}/tests/pyopenvino/tests/test_utils/test_utils.py | ||
- name: Clone API snippets | ||
if: runner.os != 'macOS' | ||
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | ||
with: | ||
sparse-checkout: docs/articles_en/assets/snippets | ||
path: ${{ env.OPENVINO_REPO }} | ||
submodules: 'false' | ||
|
||
- name: Docs Python snippets | ||
if: runner.os != 'macOS' | ||
run: | | ||
# torch, onnx | ||
python3 -m pip install -r ${INSTALL_TEST_DIR}/tests/python/preprocess/torchvision/requirements.txt -r ${INSTALL_TEST_DIR}/tests/requirements_onnx | ||
# to find 'snippets' module in docs | ||
export PYTHONPATH=${OPENVINO_REPO}/docs/articles_en/assets | ||
# for 'template' extension | ||
export LD_LIBRARY_PATH=${INSTALL_TEST_DIR}/tests/:$LD_LIBRARY_PATH | ||
python3 ${OPENVINO_REPO}/docs/articles_en/assets/snippets/main.py | ||
- name: Upload Test Results | ||
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 | ||
if: ${{ !cancelled() }} | ||
with: | ||
name: test-results-python-api-${{ inputs.python-version }} | ||
path: | | ||
${{ env.INSTALL_TEST_DIR }}/TEST*.html | ||
${{ env.INSTALL_TEST_DIR }}/TEST*.xml | ||
if-no-files-found: 'warn' |
Oops, something went wrong.