mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-30 20:18:08 +00:00
* Add docker image clean script * Change the command not to generate warning if no such image presents * Update linux-gpu-ci-pipeline.yml * Update linux-ci-pipeline.yml * Update azure-pipelines-py-packaging.yml
278 lines
9.4 KiB
YAML
278 lines
9.4 KiB
YAML
jobs:
|
|
- job: Ubuntu1604_py_Wheels
|
|
pool: Linux-CPU
|
|
strategy:
|
|
matrix:
|
|
Python35:
|
|
python.version: '3.5'
|
|
Python36:
|
|
python.version: '3.6'
|
|
Python37:
|
|
python.version: '3.7'
|
|
steps:
|
|
- template: templates/set-test-data-variables-step.yml
|
|
|
|
- task: CmdLine@2
|
|
displayName: 'Download azcopy'
|
|
inputs:
|
|
script: |
|
|
curl -so azcopy.tar.gz -L 'https://aka.ms/downloadazcopy-v10-linux'
|
|
tar -zxvf azcopy.tar.gz --strip 1
|
|
workingDirectory: $(Build.BinariesDirectory)
|
|
|
|
- task: PythonScript@0
|
|
displayName: 'Download test data'
|
|
inputs:
|
|
scriptPath: '$(Build.SourcesDirectory)/tools/ci_build/github/download_test_data.py'
|
|
arguments: --test_data_url $(TestDataUrl)
|
|
pythonInterpreter: '/usr/bin/python3'
|
|
workingDirectory: $(Build.BinariesDirectory)
|
|
|
|
- task: ShellScript@2
|
|
displayName: 'Run build script'
|
|
inputs:
|
|
scriptPath: 'tools/ci_build/github/linux/run_dockerbuild.sh'
|
|
args: '-c Release -o ubuntu16.04 -d cpu -r $(Build.BinariesDirectory) -p $(python.version) -x "--use_openmp --build_wheel"'
|
|
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy Python Wheel to: $(Build.ArtifactStagingDirectory)'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)'
|
|
Contents: 'Release/dist/*-manylinux1_x86_64.whl'
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Publish Artifact: ONNXRuntime python wheel'
|
|
inputs:
|
|
ArtifactName: onnxruntime
|
|
|
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
|
displayName: 'Component Detection'
|
|
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
|
|
|
|
- template: templates/clean-agent-build-directory-step.yml
|
|
|
|
- job: Ubuntu1604_py_GPU_Wheels
|
|
pool: Linux-GPU
|
|
strategy:
|
|
matrix:
|
|
Python35:
|
|
python.version: '3.5'
|
|
Python36:
|
|
python.version: '3.6'
|
|
Python37:
|
|
python.version: '3.7'
|
|
steps:
|
|
- template: templates/set-test-data-variables-step.yml
|
|
|
|
- task: CmdLine@2
|
|
displayName: 'Clean untagged docker images'
|
|
inputs:
|
|
script: |
|
|
docker rm $(docker ps -a | grep Exited | awk '{print $1;}') || true
|
|
docker images -q --filter "dangling=true" | xargs -n1 -r docker rmi
|
|
workingDirectory: $(Build.BinariesDirectory)
|
|
continueOnError: true
|
|
condition: always()
|
|
|
|
- task: CmdLine@2
|
|
displayName: 'Download azcopy'
|
|
inputs:
|
|
script: |
|
|
curl -so azcopy.tar.gz -L 'https://aka.ms/downloadazcopy-v10-linux'
|
|
tar -zxvf azcopy.tar.gz --strip 1
|
|
workingDirectory: $(Build.BinariesDirectory)
|
|
|
|
- task: PythonScript@0
|
|
displayName: 'Download test data'
|
|
inputs:
|
|
scriptPath: '$(Build.SourcesDirectory)/tools/ci_build/github/download_test_data.py'
|
|
arguments: --test_data_url $(TestDataUrl)
|
|
pythonInterpreter: '/usr/bin/python3'
|
|
workingDirectory: $(Build.BinariesDirectory)
|
|
|
|
- task: ShellScript@2
|
|
displayName: 'Run build script'
|
|
inputs:
|
|
scriptPath: 'tools/ci_build/github/linux/run_dockerbuild.sh'
|
|
args: '-c Release -o ubuntu16.04 -d gpu -c cuda9.1-cudnn7.1 -r $(Build.BinariesDirectory) -p $(python.version) -x "--use_openmp --build_wheel"'
|
|
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy Python Wheel to: $(Build.ArtifactStagingDirectory)'
|
|
inputs:
|
|
SourceFolder: '$(Build.BinariesDirectory)'
|
|
Contents: 'Release/dist/*-manylinux1_x86_64.whl'
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Publish Artifact: ONNXRuntime python wheel'
|
|
inputs:
|
|
ArtifactName: onnxruntime_gpu
|
|
|
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
|
displayName: 'Component Detection'
|
|
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
|
|
|
|
- template: templates/clean-agent-build-directory-step.yml
|
|
|
|
- job: Windows_py_Wheels
|
|
pool: Win-CPU
|
|
strategy:
|
|
matrix:
|
|
Python35:
|
|
python.version: '3.5'
|
|
Python36:
|
|
python.version: '3.6'
|
|
Python37:
|
|
python.version: '3.7'
|
|
variables:
|
|
buildDirectory: '$(Build.SourcesDirectory)\build'
|
|
steps:
|
|
- task: CondaEnvironment@1
|
|
inputs:
|
|
createCustomEnvironment: true
|
|
environmentName: 'py$(python.version)'
|
|
packageSpecs: 'python=$(python.version)'
|
|
cleanEnvironment: true
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Run build script'
|
|
inputs:
|
|
filename: 'build.bat'
|
|
arguments: ' --build_dir $(buildDirectory) --config Release --use_openmp --build_wheel'
|
|
workingFolder: "$(Build.SourcesDirectory)"
|
|
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy Python Wheel to: $(Build.ArtifactStagingDirectory)'
|
|
inputs:
|
|
SourceFolder: '$(buildDirectory)'
|
|
Contents: '**\dist\*.whl'
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Publish Artifact: ONNXRuntime python wheel'
|
|
inputs:
|
|
ArtifactName: onnxruntime
|
|
|
|
- task: CmdLine@1
|
|
displayName: 'Deactivating Conda Environment'
|
|
inputs:
|
|
filename: deactivate
|
|
continueOnError: true
|
|
condition: always()
|
|
|
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
|
displayName: 'Component Detection'
|
|
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
|
|
|
|
- template: templates/clean-agent-build-directory-step.yml
|
|
|
|
- job: Windows_py_GPU_Wheels
|
|
pool: Win-GPU
|
|
variables:
|
|
buildDirectory: '$(Build.SourcesDirectory)\build'
|
|
CUDA_VERSION: '9.1'
|
|
strategy:
|
|
matrix:
|
|
Python35:
|
|
python.version: '3.5'
|
|
Python36:
|
|
python.version: '3.6'
|
|
Python37:
|
|
python.version: '3.7'
|
|
steps:
|
|
- task: CondaEnvironment@1
|
|
inputs:
|
|
createCustomEnvironment: true
|
|
environmentName: 'py$(python.version)'
|
|
packageSpecs: 'python=$(python.version)'
|
|
cleanEnvironment: true
|
|
|
|
- task: PowerShell@1
|
|
displayName: 'Set CUDA path'
|
|
inputs:
|
|
scriptName: 'tools/ci_build/github/windows/set_cuda_path.ps1'
|
|
arguments: '-CudaMsbuildPath C:\local\cudaMsbuildIntegration-9.1.85-windows10-x64-0 -CudaVersion $(CUDA_VERSION)'
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Setup VS2017 env vars'
|
|
inputs:
|
|
filename: 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat'
|
|
arguments: 'amd64 -vcvars_ver=14.11'
|
|
modifyEnvironment: true
|
|
|
|
- task: BatchScript@1
|
|
displayName: 'Run build script'
|
|
inputs:
|
|
filename: 'build.bat'
|
|
arguments: ' --use_cuda --cuda_home="C:\local\cuda-9.1.85-windows10-x64-0"
|
|
--cudnn_home="C:\local\cudnn-9.1-windows10-x64-v7.1\cuda" --build_dir $(buildDirectory) --config Release --use_openmp --build_wheel'
|
|
workingFolder: "$(Build.SourcesDirectory)"
|
|
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy Python Wheel to: $(Build.ArtifactStagingDirectory)'
|
|
inputs:
|
|
SourceFolder: '$(buildDirectory)'
|
|
Contents: '**\dist\*.whl'
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Publish Artifact: ONNXRuntime python wheel'
|
|
inputs:
|
|
ArtifactName: onnxruntime_gpu
|
|
|
|
- task: CmdLine@1
|
|
displayName: 'Deactivating Conda Environment'
|
|
inputs:
|
|
filename: deactivate
|
|
continueOnError: true
|
|
condition: always()
|
|
|
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
|
displayName: 'Component Detection'
|
|
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
|
|
|
|
- template: templates/clean-agent-build-directory-step.yml
|
|
|
|
- job: MacOS_py_Wheels
|
|
pool:
|
|
vmImage: 'macOS-10.13'
|
|
strategy:
|
|
matrix:
|
|
Python35:
|
|
python.version: '3.5'
|
|
Python36:
|
|
python.version: '3.6'
|
|
Python37:
|
|
python.version: '3.7'
|
|
steps:
|
|
- task: CondaEnvironment@1
|
|
inputs:
|
|
createCustomEnvironment: true
|
|
environmentName: 'py$(python.version)'
|
|
packageSpecs: 'python=$(python.version)'
|
|
cleanEnvironment: true
|
|
|
|
- script: |
|
|
sudo python -m pip install numpy==1.15.0
|
|
sudo xcode-select --switch /Applications/Xcode_10.app/Contents/Developer
|
|
./build.sh --config Release --skip_submodule_sync --parallel --use_openmp --build_wheel
|
|
displayName: 'Command Line Script'
|
|
|
|
- task: CopyFiles@2
|
|
displayName: 'Copy Python Wheel to: $(Build.ArtifactStagingDirectory)'
|
|
inputs:
|
|
SourceFolder: '$(Build.SourcesDirectory)'
|
|
Contents: '**/dist/*.whl'
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: 'Publish Artifact: ONNXRuntime python wheel'
|
|
inputs:
|
|
ArtifactName: onnxruntime
|
|
|
|
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
|
|
displayName: 'Component Detection'
|
|
condition: and(succeeded(), in(variables['Build.Reason'], 'IndividualCI', 'BatchedCI'))
|
|
|
|
- template: templates/clean-agent-build-directory-step.yml
|