Skip to content

Commit

Permalink
use simpler inputs for install action
Browse files Browse the repository at this point in the history
  • Loading branch information
akashchi committed Nov 12, 2024
1 parent 64b811c commit 320187d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 40 deletions.
33 changes: 5 additions & 28 deletions .github/actions/install_ov_wheels/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,18 @@ inputs:
wheels-dir-path:
description: 'Path to the directory in which wheels are located'
required: true
install-core-wheel:
description: 'Whether to install the OpenVINO Core wheel (openvino-*.whl)'
required: true
install-tokenizers-wheel:
description: 'Whether to install the OpenVINO Dev wheel (openvino_tokenizes*.whl)'
wheels-to-install:
description: 'List of wheel names to install in the form of "openvino openvino-dev openvino-tokenizers"'
required: true
runs:
using: 'composite'
steps:
- name: Install OpenVINO Python wheels (Windows)
shell: pwsh
if: runner.os == 'Windows'
run: |
if ( "${{ inputs.install-core-wheel }}" -eq "true" )
{
$pyVersion = python3 -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')"
$ovCoreWheelPath = Get-ChildItem -Path ${{ inputs.wheels-dir-path }} -Filter "openvino-*cp$pyVersion*.whl" | % { $_.FullName }
python3 -m pip install $ovCoreWheelPath
}
if ( "${{ inputs.install-tokenizers-wheel }}" -eq "true" )
{
$ovTokenizersWheelPath = Get-ChildItem -Path ${{ inputs.wheels-dir-path }} -Filter openvino_tokenizers-*.whl | % { $_.FullName }
python3 -m pip install "$ovTokenizersWheelPath"
}
run: python3 -m pip install ${{ inputs.wheels-to-install }} --find-links ${{ inputs.wheels-dir-path }} --no-index --no-cache

- name: Install OpenVINO Python wheels (Linux and macOS)
shell: bash
if: runner.os != 'Windows'
run: |
if [[ "${{ inputs.install-core-wheel }}" == "true" ]]; then
py_version=$(python3 -c "import sys; print(f'{sys.version_info.major}{sys.version_info.minor}')")
ov_wheel_path=$(find ${{ inputs.wheels-dir-path }} -name "openvino-*cp$py_version*.whl")
python3 -m pip install $ov_wheel_path
fi
if [[ "${{ inputs.install-tokenizers-wheel }}" == "true" ]]; then
python3 -m pip install ${{ inputs.wheels-dir-path }}/openvino_tokenizers-*.whl
fi
run: python3 -m pip install ${{ inputs.wheels-to-install }} --find-links ${{ inputs.wheels-dir-path }} --no-index --no-cache
3 changes: 1 addition & 2 deletions .github/workflows/job_pytorch_layer_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ jobs:
uses: ./openvino/.github/actions/install_ov_wheels
with:
wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}
install-core-wheel: true
install-tokenizers-wheel: false
wheels-to-install: 'openvino'

- name: Install Pytorch Layer tests dependencies
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/job_tensorflow_layer_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ jobs:
uses: ./openvino/.github/actions/install_ov_wheels
with:
wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}
install-core-wheel: true
install-tokenizers-wheel: true
wheels-to-install: 'openvino openvino-tokenizers'

- name: Install Python Layer tests dependencies
run: |
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/job_tokenizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ jobs:
uses: ./.github/actions/install_ov_wheels
with:
wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}
install-core-wheel: true
install-tokenizers-wheel: false
wheels-to-install: 'openvino'

#
# Build
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/windows_vs2019_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ jobs:
uses: ./openvino/.github/actions/install_ov_wheels
with:
wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}
install-core-wheel: true
install-tokenizers-wheel: false
wheels-to-install: 'openvino'

- name: Samples tests
run: |
Expand Down Expand Up @@ -302,8 +301,7 @@ jobs:
uses: ./openvino/.github/actions/install_ov_wheels
with:
wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}
install-core-wheel: true
install-tokenizers-wheel: false
wheels-to-install: 'openvino'

- name: Install Python API tests dependencies
run: |
Expand Down Expand Up @@ -464,8 +462,7 @@ jobs:
uses: ./openvino/.github/actions/install_ov_wheels
with:
wheels-dir-path: ${{ env.INSTALL_WHEELS_DIR }}
install-core-wheel: true
install-tokenizers-wheel: false
wheels-to-install: 'openvino'

- name: Install Python API tests dependencies
run: python3 -m pip install -r ${{ env.INSTALL_TEST_DIR }}/bindings/python/requirements_test.txt
Expand Down

0 comments on commit 320187d

Please sign in to comment.