mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
### Description fix the error caused by https://github.com/microsoft/onnxruntime/pull/19973
104 lines
3.4 KiB
YAML
104 lines
3.4 KiB
YAML
trigger: none
|
|
|
|
resources:
|
|
repositories:
|
|
- repository: manylinux
|
|
type: Github
|
|
endpoint: Microsoft
|
|
name: pypa/manylinux
|
|
ref: 5eda9aded5462201e6310105728d33016e637ea7
|
|
|
|
stages:
|
|
- stage: Python_Packaging_Linux_Training_CPU
|
|
|
|
jobs:
|
|
- job: Linux_Training_CPU_Wheels
|
|
timeoutInMinutes: 180
|
|
workspace:
|
|
clean: all
|
|
pool: onnxruntime-Ubuntu2204-AMD-CPU
|
|
|
|
strategy:
|
|
matrix:
|
|
Python38:
|
|
PythonVersion: '3.8'
|
|
Python39:
|
|
PythonVersion: '3.9'
|
|
Python310:
|
|
PythonVersion: '3.10'
|
|
Python311:
|
|
PythonVersion: '3.11'
|
|
Python312:
|
|
PythonVersion: '3.12'
|
|
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
submodules: recursive
|
|
|
|
- template: templates/set-python-manylinux-variables-step.yml
|
|
|
|
- template: templates/get-docker-image-steps.yml
|
|
parameters:
|
|
Dockerfile: tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_cpu
|
|
Context: tools/ci_build/github/linux/docker
|
|
DockerBuildArgs: >-
|
|
--build-arg PYTHON_VERSION=$(PythonVersion)
|
|
--build-arg INSTALL_DEPS_EXTRA_ARGS=-tu
|
|
--build-arg BUILD_UID=$(id -u)
|
|
Repository: onnxruntimetrainingcpubuild_$(PythonVersion)
|
|
|
|
- task: CmdLine@2
|
|
displayName: 'build onnxruntime'
|
|
inputs:
|
|
script: |
|
|
mkdir -p $HOME/.onnx
|
|
docker run --rm \
|
|
--volume /data/onnx:/data/onnx:ro \
|
|
--volume $(Build.SourcesDirectory):/onnxruntime_src \
|
|
--volume $(Build.BinariesDirectory):/build \
|
|
--volume /data/models:/build/models:ro \
|
|
--volume $HOME/.onnx:/home/onnxruntimedev/.onnx \
|
|
-e NIGHTLY_BUILD \
|
|
-e BUILD_BUILDNUMBER \
|
|
-e ORT_DISABLE_PYTHON_PACKAGE_LOCAL_VERSION \
|
|
-e DEFAULT_TRAINING_PACKAGE_DEVICE \
|
|
onnxruntimetrainingcpubuild_$(PythonVersion) \
|
|
$(PythonManylinuxDir)/bin/python3 /onnxruntime_src/tools/ci_build/build.py \
|
|
--build_dir /build --cmake_generator Ninja \
|
|
--config Debug Release \
|
|
--skip_submodule_sync \
|
|
--build_shared_lib \
|
|
--parallel --use_binskim_compliant_compile_flags \
|
|
--build_wheel \
|
|
--enable_onnx_tests \
|
|
--enable_pybind --enable_training
|
|
workingDirectory: $(Build.SourcesDirectory)
|
|
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy Python Wheel to: $(Build.ArtifactStagingDirectory)'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)'
|
|
Contents: 'Release/dist/*.whl'
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Publish Artifact: ONNXRuntime python wheel and documentation'
|
|
inputs:
|
|
ArtifactName: onnxruntime_training_cpu
|
|
|
|
- template: templates/component-governance-component-detection-steps.yml
|
|
parameters:
|
|
condition: 'succeeded'
|
|
|
|
- template: templates/clean-agent-build-directory-step.yml
|
|
|
|
- template: templates/py-packaging-stage.yml
|
|
parameters:
|
|
build_py_parameters: --enable_training
|
|
enable_linux_gpu: false
|
|
enable_linux_cpu: false
|
|
enable_windows_cpu: true
|
|
enable_windows_gpu: false
|
|
enable_mac_cpu: true
|
|
enable_linux_arm: false
|