Add Debug build to OpenVINO-ONNX CI (#5034)
This commit is contained in:
parent
8c50c3d155
commit
0f8cdfa293
@ -1,6 +1,10 @@
|
|||||||
FROM ubuntu:20.04
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
LABEL version=2020.07.09.1
|
LABEL version=2021.03.30.1
|
||||||
|
|
||||||
|
# Build configuration arguments
|
||||||
|
ARG BUILD_TYPE=Release
|
||||||
|
ARG PROTOBUF_LITE=OFF
|
||||||
|
|
||||||
ARG http_proxy
|
ARG http_proxy
|
||||||
ARG https_proxy
|
ARG https_proxy
|
||||||
@ -10,7 +14,6 @@ ENV https_proxy ${https_proxy}
|
|||||||
ENV CI=true
|
ENV CI=true
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
ARG PROTOBUF_LITE=OFF
|
|
||||||
|
|
||||||
# Install base dependencies
|
# Install base dependencies
|
||||||
RUN apt-get update && apt-get install -y locales && apt-get clean autoclean && apt-get autoremove -y
|
RUN apt-get update && apt-get install -y locales && apt-get clean autoclean && apt-get autoremove -y
|
||||||
@ -52,7 +55,7 @@ RUN apt-get update && apt-get -y --no-install-recommends install \
|
|||||||
COPY . /openvino/
|
COPY . /openvino/
|
||||||
WORKDIR /openvino/build
|
WORKDIR /openvino/build
|
||||||
RUN cmake .. \
|
RUN cmake .. \
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
|
||||||
-DENABLE_VPU=OFF \
|
-DENABLE_VPU=OFF \
|
||||||
-DENABLE_GNA=OFF \
|
-DENABLE_GNA=OFF \
|
||||||
-DENABLE_OPENCV=OFF \
|
-DENABLE_OPENCV=OFF \
|
||||||
@ -75,7 +78,7 @@ RUN make -j $(nproc) install
|
|||||||
|
|
||||||
# Run tests via tox
|
# Run tests via tox
|
||||||
WORKDIR /openvino/ngraph/python
|
WORKDIR /openvino/ngraph/python
|
||||||
ENV NGRAPH_CPP_BUILD_PATH=/openvino/dist/deployment_tools/ngraph
|
ENV ngraph_DIR=/openvino/dist/deployment_tools/ngraph
|
||||||
ENV LD_LIBRARY_PATH=/openvino/dist/deployment_tools/ngraph/lib
|
ENV LD_LIBRARY_PATH=/openvino/dist/deployment_tools/ngraph/lib
|
||||||
ENV PYTHONPATH=/openvino/bin/intel64/Release/lib/python_api/python3.8:${PYTHONPATH}
|
ENV PYTHONPATH=/openvino/bin/intel64/${BUILD_TYPE}/lib/python_api/python3.8:${PYTHONPATH}
|
||||||
CMD tox
|
CMD tox
|
||||||
|
41
.ci/openvino-onnx/Jenkinsfile
vendored
41
.ci/openvino-onnx/Jenkinsfile
vendored
@ -5,8 +5,9 @@ DOCKER_CONTAINER_NAME= "openvino-onnx-ci-container"
|
|||||||
DOCKER_IMAGE_TAG = "openvino-onnx-ci-image"
|
DOCKER_IMAGE_TAG = "openvino-onnx-ci-image"
|
||||||
|
|
||||||
BACKEND_CONFIGURATIONS = [
|
BACKEND_CONFIGURATIONS = [
|
||||||
[ protobuf_lite : "ON" ],
|
[ name: "Release", build_type: "Release", protobuf_lite : "OFF" ],
|
||||||
[ protobuf_lite : "OFF" ]
|
[ name: "Debug", build_type: "Debug", protobuf_lite : "OFF" ],
|
||||||
|
[ name: "Rel+Lite", build_type: "Release", protobuf_lite : "ON" ],
|
||||||
]
|
]
|
||||||
|
|
||||||
// workaround for aborting previous builds on PR update
|
// workaround for aborting previous builds on PR update
|
||||||
@ -95,29 +96,41 @@ def updateModels() {
|
|||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
|
||||||
def buildDockerImage(String protobuf_lite="OFF") {
|
def buildDockerImage(Map configuration) {
|
||||||
updateModels()
|
updateModels()
|
||||||
sh """
|
sh """
|
||||||
docker build --tag=${DOCKER_IMAGE_TAG} --build-arg PROTOBUF_LITE=${protobuf_lite} \
|
docker build --tag=${DOCKER_IMAGE_TAG} \
|
||||||
|
--build-arg BUILD_TYPE=${configuration.build_type} \
|
||||||
|
--build-arg PROTOBUF_LITE=${configuration.protobuf_lite} \
|
||||||
--file=.ci/openvino-onnx/Dockerfile \
|
--file=.ci/openvino-onnx/Dockerfile \
|
||||||
--build-arg http_proxy=http://proxy-chain.intel.com:911/ \
|
--build-arg http_proxy=http://proxy-chain.intel.com:911/ \
|
||||||
--build-arg https_proxy=http://proxy-chain.intel.com:912/ .
|
--build-arg https_proxy=http://proxy-chain.intel.com:912/ .
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
|
||||||
def runTests() {
|
def runTests(Map configuration) {
|
||||||
sh """
|
// Run only basic unit tests in Debug configuration
|
||||||
docker run --name ${DOCKER_CONTAINER_NAME} \
|
if (configuration.build_type == "Debug") {
|
||||||
--volume ${HOME}/ONNX_CI/data/model_zoo:/root/.onnx/model_zoo \
|
sh """
|
||||||
${DOCKER_IMAGE_TAG}
|
docker run --name ${DOCKER_CONTAINER_NAME} ${DOCKER_IMAGE_TAG}
|
||||||
"""
|
"""
|
||||||
|
}
|
||||||
|
|
||||||
|
// Run unit-tests AND large model tests by default
|
||||||
|
else {
|
||||||
|
sh """
|
||||||
|
docker run --name ${DOCKER_CONTAINER_NAME} \
|
||||||
|
--volume ${HOME}/ONNX_CI/data/model_zoo:/root/.onnx/model_zoo \
|
||||||
|
${DOCKER_IMAGE_TAG} /bin/bash -c "tox && tox -e zoo_models"
|
||||||
|
"""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def getConfigurationsMap() {
|
def getConfigurationsMap() {
|
||||||
def configurationsMap = [:]
|
def configurationsMap = [:]
|
||||||
for (backend in BACKEND_CONFIGURATIONS) {
|
for (backend in BACKEND_CONFIGURATIONS) {
|
||||||
def configuration = backend.clone()
|
def configuration = backend.clone()
|
||||||
configuration.name = "protobuf-lite ${configuration.protobuf_lite}"
|
configuration.name = "${configuration.name}"
|
||||||
configurationsMap[configuration.name] = {
|
configurationsMap[configuration.name] = {
|
||||||
stage(configuration.name) { CONFIGURATION_WORKFLOW(configuration) }
|
stage(configuration.name) { CONFIGURATION_WORKFLOW(configuration) }
|
||||||
}
|
}
|
||||||
@ -143,12 +156,12 @@ CONFIGURATION_WORKFLOW = { configuration ->
|
|||||||
}
|
}
|
||||||
stage("Prepare Docker environment") {
|
stage("Prepare Docker environment") {
|
||||||
dir("${WORKDIR}") {
|
dir("${WORKDIR}") {
|
||||||
buildDockerImage(configuration.protobuf_lite)
|
buildDockerImage(configuration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage("Run tests") {
|
stage("Run tests") {
|
||||||
timeout(time: 20, unit: 'MINUTES') {
|
timeout(time: 20, unit: 'MINUTES') {
|
||||||
runTests()
|
runTests(configuration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -166,8 +179,8 @@ CONFIGURATION_WORKFLOW = { configuration ->
|
|||||||
stage("Cleanup") {
|
stage("Cleanup") {
|
||||||
deleteDir()
|
deleteDir()
|
||||||
sh """
|
sh """
|
||||||
docker image prune -f
|
|
||||||
docker rm -f ${DOCKER_CONTAINER_NAME}
|
docker rm -f ${DOCKER_CONTAINER_NAME}
|
||||||
|
docker image prune -f
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,4 +7,4 @@ pydocstyle==5.1.1
|
|||||||
pytest==6.1.2
|
pytest==6.1.2
|
||||||
retrying==1.3.3
|
retrying==1.3.3
|
||||||
tox==3.23.0
|
tox==3.23.0
|
||||||
wheel==0.35.1
|
wheel==0.36.2
|
||||||
|
@ -13,7 +13,7 @@ deps =
|
|||||||
setenv =
|
setenv =
|
||||||
NGRAPH_BACKEND = {env:NGRAPH_BACKEND:"CPU"}
|
NGRAPH_BACKEND = {env:NGRAPH_BACKEND:"CPU"}
|
||||||
PYTHONPATH = {env:PYTHONPATH}
|
PYTHONPATH = {env:PYTHONPATH}
|
||||||
ngraph_DIR = {env:NGRAPH_CPP_BUILD_PATH}
|
ngraph_DIR = {env:ngraph_DIR}
|
||||||
passenv =
|
passenv =
|
||||||
http_proxy
|
http_proxy
|
||||||
https_proxy
|
https_proxy
|
||||||
@ -24,6 +24,11 @@ commands=
|
|||||||
flake8 --ignore=D100,D101,D102,D103,D104,D105,D107,W503 tests/ # ignore lack of docs in tests
|
flake8 --ignore=D100,D101,D102,D103,D104,D105,D107,W503 tests/ # ignore lack of docs in tests
|
||||||
mypy --config-file=tox.ini {posargs:src/}
|
mypy --config-file=tox.ini {posargs:src/}
|
||||||
pytest --backend={env:NGRAPH_BACKEND} tests -v -k 'not _cuda' --ignore=tests/test_onnx/test_zoo_models.py
|
pytest --backend={env:NGRAPH_BACKEND} tests -v -k 'not _cuda' --ignore=tests/test_onnx/test_zoo_models.py
|
||||||
|
|
||||||
|
[testenv:zoo_models]
|
||||||
|
commands=
|
||||||
|
{envbindir}/python setup.py bdist_wheel
|
||||||
|
{envbindir}/pip install --no-index --pre --find-links=dist/ ngraph-core
|
||||||
pytest --backend={env:NGRAPH_BACKEND} tests/test_onnx/test_zoo_models.py -v -n 4 -k 'not _cuda' --model_zoo_xfail
|
pytest --backend={env:NGRAPH_BACKEND} tests/test_onnx/test_zoo_models.py -v -n 4 -k 'not _cuda' --model_zoo_xfail
|
||||||
|
|
||||||
[testenv:devenv]
|
[testenv:devenv]
|
||||||
|
Loading…
Reference in New Issue
Block a user