onnxruntime/tools/ci_build/github/azure-pipelines/linux-cpu-eager-pipeline.yml
Tang, Cheng 8db49e3d0f
add ortmodule and eager mode test (#9888)
* add ortmodule and eager mode test

* add ortmodule dependency

* fix eager pipeline

* skip tthe ortmodule test for windows due to win ci issue

* remove useless win ci change

* add torch

Co-authored-by: Abhishek Jindal <abjindal@microsoft.com>
2021-12-02 19:49:18 -08:00

68 lines
2.5 KiB
YAML

jobs:
- job: Linux_Build
timeoutInMinutes: 120
workspace:
clean: all
pool: Linux-CPU-2019
steps:
- checkout: self
clean: true
submodules: recursive
- task: NodeTool@0
inputs:
versionSpec: '12.16.3'
- template: templates/get-docker-image-steps.yml
parameters:
Dockerfile: tools/ci_build/github/linux/docker/Dockerfile.manylinux2014_eager_cpu
Context: tools/ci_build/github/linux/docker
DockerBuildArgs: "--build-arg BUILD_UID=$( id -u )"
Repository: onnxruntimecpubuildeagermode
- task: CmdLine@2
displayName: 'build'
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 $HOME/.onnx:/home/onnxruntimedev/.onnx \
-e ALLOW_RELEASED_ONNX_OPSET_ONLY=0 \
-e NIGHTLY_BUILD \
-e BUILD_BUILDNUMBER \
onnxruntimecpubuildeagermode \
/opt/python/cp38-cp38/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 \
--build_eager_mode --enable_training --build_wheel --skip_test
workingDirectory: $(Build.SourcesDirectory)
- task: CmdLine@2
displayName: 'install ortmodule extension and test'
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 $HOME/.onnx:/home/onnxruntimedev/.onnx \
-e ALLOW_RELEASED_ONNX_OPSET_ONLY=0 \
-e NIGHTLY_BUILD \
-e BUILD_BUILDNUMBER \
onnxruntimecpubuildeagermode \
bash -c "export PYTHONPATH=/build/Release && /opt/python/cp38-cp38/bin/python3 -m onnxruntime.training.ortmodule.torch_cpp_extensions.install &&\
/opt/python/cp38-cp38/bin/python3 /onnxruntime_src/tools/ci_build/build.py \
--build_dir /build --cmake_generator Ninja \
--config Release \
--skip_submodule_sync \
--build_shared_lib \
--parallel \
--build_eager_mode --enable_training --build_wheel --test"
workingDirectory: $(Build.SourcesDirectory)