diff --git a/.ci/azure/linux.yml b/.ci/azure/linux.yml index 4673b672d..ebb9b06c3 100644 --- a/.ci/azure/linux.yml +++ b/.ci/azure/linux.yml @@ -48,6 +48,7 @@ jobs: MODELS_PATH: $(REPO_DIR)/../testdata WORK_DIR: $(Pipeline.Workspace)/_w BUILD_DIR: $(WORK_DIR)/build + BUILD_WHEEL_DIR: ${BUILD_DIR}/wheels BIN_DIR: $(OPENVINO_REPO_DIR)/bin/intel64/$(BUILD_TYPE) INSTALL_DIR: $(WORK_DIR)/install_pkg SETUPVARS: $(INSTALL_DIR)/setupvars.sh @@ -172,10 +173,24 @@ jobs: python -m pip install -r $(REPO_DIR)/modules/custom_operations/tests/requirements.txt python -m pip install $(INSTALL_DIR)/tools/openvino-*.whl python -m pip install $(OPENVINO_REPO_DIR)/tools/mo/ - python -m pip install $(REPO_DIR)/modules/custom_operations/.[all] workingDirectory: $(WORK_DIR) displayName: 'Create virtual env' + - script: | + source .env3/bin/activate && source $(SETUPVARS) + python -m build --wheel --outdir $(BUILD_WHEEL_DIR) + workingDirectory: $(REPO_DIR)\modules\custom_operations + displayName: 'Build tokenizers wheel' + + - script: | + source .env3/bin/activate + python -m pip install $(BUILD_WHEEL_DIR)/*.whl + workingDirectory: $(WORK_DIR) + displayName: 'Install tokenizers wheel' + + - publish: $(BUILD_WHEEL_DIR) + artifact: Wheels + - script: | source $(WORK_DIR)/.env3/bin/activate # need to enable sparse_conv tests with new Open3D release diff --git a/.ci/azure/mac.yml b/.ci/azure/mac.yml index de9032e6d..f9696b7e3 100644 --- a/.ci/azure/mac.yml +++ b/.ci/azure/mac.yml @@ -54,6 +54,7 @@ jobs: MODELS_PATH: $(REPO_DIR)/../testdata WORK_DIR: $(Pipeline.Workspace)/_w BUILD_DIR: $(WORK_DIR)/build + BUILD_WHEEL_DIR: $(BUILD_DIR)/wheels BIN_DIR: $(OPENVINO_REPO_DIR)/bin/intel64/$(BUILD_TYPE) INSTALL_DIR: $(WORK_DIR)/install_pkg SETUPVARS: $(INSTALL_DIR)/setupvars.sh @@ -163,10 +164,24 @@ jobs: python -m pip install -r $(REPO_DIR)/modules/custom_operations/tests/requirements.txt python -m pip install $(OPENVINO_REPO_DIR)/tools/mo/ python -m pip install $(INSTALL_DIR)/tools/openvino-*.whl - python -m pip install $(REPO_DIR)/modules/custom_operations/.[transformers] workingDirectory: $(WORK_DIR) displayName: 'Create virtual env' + - script: | + source .env3/bin/activate && source $(SETUPVARS) + python -m build --wheel --outdir $(BUILD_WHEEL_DIR) + workingDirectory: $(REPO_DIR)\modules\custom_operations + displayName: 'Build tokenizers wheel' + + - script: | + source .env3/bin/activate + python -m pip install $(BUILD_WHEEL_DIR)/*.whl + workingDirectory: $(WORK_DIR) + displayName: 'Install tokenizers wheel' + + - publish: $(BUILD_WHEEL_DIR) + artifact: Wheels + - script: | source $(WORK_DIR)/venv/bin/activate python -m pytest --tb=no tokenizers_test.py diff --git a/.ci/azure/windows.yml b/.ci/azure/windows.yml index d2bd7bd6f..3414ea69b 100644 --- a/.ci/azure/windows.yml +++ b/.ci/azure/windows.yml @@ -48,6 +48,7 @@ jobs: WORK_DIR: $(Pipeline.Workspace)\_w BUILD_DIR: D:\build BUILD_DIR_CONTRIB: D:\build_contrib + BUILD_WHEEL_DIR_CONTRIB: $(BUILD_DIR_CONTRIB)\wheels MSVS_VARS_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat MSVC_COMPILER_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\bin\Hostx64\x64\cl.exe INSTALL_DIR: $(WORK_DIR)\install_pkg @@ -99,18 +100,31 @@ jobs: powershell -command "Expand-Archive -Force ninja-win.zip" powershell -command "Invoke-WebRequest https://services.gradle.org/distributions/gradle-$(GRADLE_VER)-bin.zip -OutFile gradle-$(GRADLE_VER)-bin.zip" powershell -command "Expand-Archive -Force gradle-$(GRADLE_VER)-bin.zip" - call $(SETUPVARS) + call $(SETUPVARS) -pyver 3.8 $(PYTHON_EXE) -m pip install --upgrade pip $(PYTHON_EXE) -m pip install -r $(OPENVINO_REPO_DIR)\src\bindings\python\src\compatibility\openvino\requirements-dev.txt $(PYTHON_EXE) -m pip install -r $(OPENVINO_REPO_DIR)\src\bindings\python\requirements.txt $(PYTHON_EXE) -m pip install -r $(REPO_DIR)\modules\custom_operations\tests\requirements.txt $(PYTHON_EXE) -m pip install $(OPENVINO_REPO_DIR)\tools\mo - $(PYTHON_EXE) -m pip install $(REPO_DIR)\modules\custom_operations\.[all] powershell -command "Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" choco install opencv -y workingDirectory: $(WORK_DIR) displayName: 'Install dependencies' + - script: | + call $(SETUPVARS) -pyver 3.8 + $(PYTHON_EXE) -m build --wheel --outdir $(BUILD_WHEEL_DIR_CONTRIB) + workingDirectory: $(REPO_DIR)\modules\custom_operations + displayName: 'Build tokenizers wheel' + + - script: | + $(PYTHON_EXE) -m pip install $(BUILD_WHEEL_DIR_CONTRIB)/*.whl + workingDirectory: $(WORK_DIR) + displayName: 'Install tokenizers wheel' + + - publish: $(BUILD_WHEEL_DIR_CONTRIB) + artifact: Wheels + - script: | set PATH=$(WORK_DIR)\ninja-win;%PATH% call "$(MSVS_VARS_PATH)"