disable azure ops from ci/packaging pipelines (#746)

* disable azure ops from ci/packaging pipelines

* add the missed files

* keep the env variable flag

* add python to the path?
This commit is contained in:
Wenbing Li 2024-06-13 21:11:55 -07:00 коммит произвёл GitHub
Родитель 690bed71b6
Коммит 3c22daa4cf
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
7 изменённых файлов: 13 добавлений и 14 удалений

Просмотреть файл

@ -121,7 +121,7 @@ stages:
inputs: inputs:
versionSpec: '3.x' versionSpec: '3.x'
disableDownloadFromRegistry: true disableDownloadFromRegistry: true
addToPath: false addToPath: true
architecture: 'x64' architecture: 'x64'
- script: | - script: |
@ -507,7 +507,7 @@ stages:
inputs: inputs:
versionSpec: '3.x' versionSpec: '3.x'
disableDownloadFromRegistry: true disableDownloadFromRegistry: true
addToPath: false addToPath: true
architecture: 'x64' architecture: 'x64'
displayName: Use ADO python task displayName: Use ADO python task
@ -583,7 +583,7 @@ stages:
inputs: inputs:
versionSpec: '3.x' versionSpec: '3.x'
disableDownloadFromRegistry: true disableDownloadFromRegistry: true
addToPath: false addToPath: true
architecture: 'x64' architecture: 'x64'
displayName: Use ADO python task displayName: Use ADO python task

Просмотреть файл

@ -132,7 +132,7 @@ stages:
inputs: inputs:
versionSpec: '3.x' versionSpec: '3.x'
disableDownloadFromRegistry: true disableDownloadFromRegistry: true
addToPath: false addToPath: true
architecture: 'x64' architecture: 'x64'
displayName: Use ADO python task displayName: Use ADO python task
@ -172,7 +172,7 @@ stages:
inputs: inputs:
versionSpec: '3.x' versionSpec: '3.x'
disableDownloadFromRegistry: true disableDownloadFromRegistry: true
addToPath: false addToPath: true
architecture: 'x64' architecture: 'x64'
displayName: Use ADO python task displayName: Use ADO python task

Просмотреть файл

@ -2,7 +2,7 @@ parameters:
- name: ExtraEnv - name: ExtraEnv
displayName: 'Extra env variable set to CIBW_ENVIRONMENT, in form of "A=1 B=2 C=3"' displayName: 'Extra env variable set to CIBW_ENVIRONMENT, in form of "A=1 B=2 C=3"'
type: string type: string
default: 'OCOS_ENABLE_AZURE=1' default: 'OCOS_ENABLE_AZURE=0'
jobs: jobs:
- job: linux_x86_64 - job: linux_x86_64

Просмотреть файл

@ -90,12 +90,11 @@ set(OCOS_ONNXRUNTIME_PKG_URI "" CACHE STRING
"Specify the onnxruntime C++ shared library zip package path, like ./onnxruntime-win-x64-1.16.0.zip") "Specify the onnxruntime C++ shared library zip package path, like ./onnxruntime-win-x64-1.16.0.zip")
set(OCOS_BUILD_PRESET "" CACHE STRING set(OCOS_BUILD_PRESET "" CACHE STRING
"Specify the build preset cmake settings file path, like 'token_api_only' which includes ./cmake/presets/token_api_only.cmake") "Specify the build preset cmake settings file path, like 'token_api_only' which includes ./cmake/presets/token_api_only.cmake")
# TODO: Remove the following statements if AzureOp build is enabled by default.
# If build_buildid environment varaible is set, which means this is a CI build, then always enable AzureOp. # AzureOp can be enabled by environment varaible OCOS_ENABLE_AZURE == 1
# or it is enabled when OCOS_ENABLE_AZURE is set, which means the user explicitly enables it. if (DEFINED ENV{OCOS_ENABLE_AZURE})
if ((DEFINED ENV{BUILD_BUILDID}) OR (DEFINED ENV{OCOS_ENABLE_AZURE}))
set(OCOS_ENABLE_AZURE ON CACHE INTERNAL "" FORCE) set(OCOS_ENABLE_AZURE ON CACHE INTERNAL "" FORCE)
message(STATUS "=> AzureOp is enabled by default.") message(STATUS "=> AzureOp is enabled env variable.")
endif() endif()
function(disable_all_operators) function(disable_all_operators)

Просмотреть файл

@ -1312,7 +1312,7 @@ expect(node, inputs=[text, pattern, rewrite], outputs=[y],
## Azure operators ## Azure operators
Starting from onnxruntime-extensions 0.12, these Azure operators will be removed from the official onnxruntime-extensions packages. However, they can still be built from source using `cmake -DOCOS_ENABLE_AZURE=ON ...`.
### OpenAIAudioToText ### OpenAIAudioToText
<details> <details>

Просмотреть файл

@ -2,7 +2,7 @@
if "%OCOS_ENABLE_AZURE%"=="1" ( if "%OCOS_ENABLE_AZURE%"=="1" (
pushd %1\test pushd %1\test
python -m pip install coloredlogs flatbuffers numpy packaging protobuf sympy python -m pip install coloredlogs flatbuffers numpy packaging protobuf sympy
python -m pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ ort-nightly==1.16.0.dev20230820005 python -m pip install onnxruntime==1.18
python test_azure_ops.py python test_azure_ops.py
popd popd
) )

Просмотреть файл

@ -4,7 +4,7 @@ if [[ "$OCOS_ENABLE_AZURE" == "1" ]]
then then
pushd $1/test pushd $1/test
python -m pip install coloredlogs flatbuffers numpy packaging protobuf sympy python -m pip install coloredlogs flatbuffers numpy packaging protobuf sympy
python -m pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ ort-nightly==1.16.0.dev20230820005 python -m pip install onnxruntime==1.18
python ./test_azure_ops.py python ./test_azure_ops.py
popd popd
fi fi