Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
18bf3162
Commit
18bf3162
authored
Jun 25, 2019
by
Łukasz Durka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable ONNX Runtime CI for nGraph
parent
22c4f3fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
157 additions
and
0 deletions
+157
-0
Jenkinsfile
.ci/onnx/onnxruntime/Jenkinsfile
+134
-0
proxy.patch
.ci/onnx/onnxruntime/proxy.patch
+23
-0
No files found.
.ci/onnx/onnxruntime/Jenkinsfile
0 → 100644
View file @
18bf3162
// INTEL CONFIDENTIAL
// Copyright 2017-2019 Intel Corporation All Rights Reserved.
// The source code contained or described herein and all documents related to the
// source code ("Material") are owned by Intel Corporation or its suppliers or
// licensors. Title to the Material remains with Intel Corporation or its
// suppliers and licensors. The Material may contain trade secrets and proprietary
// and confidential information of Intel Corporation and its suppliers and
// licensors, and is protected by worldwide copyright and trade secret laws and
// treaty provisions. No part of the Material may be used, copied, reproduced,
// modified, published, uploaded, posted, transmitted, distributed, or disclosed
// in any way without Intel's prior express written permission.
// No license under any patent, copyright, trade secret or other intellectual
// property right is granted to or conferred upon you by disclosure or delivery of
// the Materials, either expressly, by implication, inducement, estoppel or
// otherwise. Any license under such intellectual property rights must be express
// and approved by Intel in writing.
try
{
if
(
LABEL
.
trim
()
==
""
)
{
throw
new
Exception
();}
}
catch
(
Exception
e
){
LABEL
=
"onnx && ci"
};
echo
"${LABEL}"
NGRPAH_REPOSITORY
=
"https://github.com/NervanaSystems/ngraph.git"
NGRAPH_COMMIT_HASH
=
"${ghprbActualCommit}"
// particular nGraph PR commit hash
ONNX_REPOSITORY
=
"https://github.com/NervanaSystems/onnxruntime.git"
ONNX_RUNTIME_BRANCH
=
"master"
def
main
(){
timeout
(
activity:
true
,
time:
15
)
{
try
{
stage
(
"CloneRepos"
){
CloneRepos
()
}
stage
(
"Apply Patch"
){
ApplyPatch
()
}
stage
(
"Onnx Models"
){
BuildAndTest
()
}
}
catch
(
e
)
{
// Set result to ABORTED if exception contains exit code of a process interrupted by SIGTERM
if
(
"$e"
.
contains
(
"143"
))
{
currentBuild
.
result
=
"ABORTED"
}
else
{
currentBuild
.
result
=
"FAILURE"
}
}
stage
(
"Clean"
){
Clean
()
}
}
}
def
CloneRepos
()
{
dir
(
"ngraph"
){
checkout
([
$class
:
'GitSCM'
,
branches:
[[
name:
"${NGRAPH_COMMIT_HASH}"
]],
doGenerateSubmoduleConfigurations:
false
,
extensions:
[[
$class
:
'SubmoduleOption'
,
disableSubmodules:
false
,
parentCredentials:
true
,
recursiveSubmodules:
true
,
reference:
''
,
trackingSubmodules:
false
,
timeout:
15
]],
submoduleCfg:
[],
userRemoteConfigs:
[[
refspec:
'+refs/pull/*:refs/remotes/origin/pr/*'
,
url:
"${NGRPAH_REPOSITORY}"
]]
])
}
dir
(
"onnxruntime"
)
{
checkout
([
$class
:
'GitSCM'
,
branches:
[[
name:
"${ONNX_RUNTIME_BRANCH}"
]],
doGenerateSubmoduleConfigurations:
false
,
extensions:
[[
$class
:
'SubmoduleOption'
,
disableSubmodules:
false
,
parentCredentials:
true
,
recursiveSubmodules:
true
,
reference:
''
,
trackingSubmodules:
false
,
timeout:
15
]],
submoduleCfg:
[],
userRemoteConfigs:
[[
url:
"${ONNX_REPOSITORY}"
]]
])
}
}
def
ApplyPatch
(){
dir
(
"onnxruntime"
){
echo
"Update cmake/external/ngraph.cmake with ${NGRAPH_COMMIT_HASH}"
sh
"""
sed -i 's/set(ngraph_TAG ".*")/set(ngraph_TAG "${NGRAPH_COMMIT_HASH}")/g' cmake/external/ngraph.cmake
grep -q "${NGRAPH_COMMIT_HASH}" cmake/external/ngraph.cmake
"""
echo
"Add proxy to tools/ci_build/github/linux/docker/Dockerfile.ubuntu"
sh
"""
sed -i 's|{HTTP_PROXY}|${env.http_proxy}|g' ../ngraph/.ci/onnx/onnxruntime/proxy.patch
sed -i 's|{SOCKS_PROXY}|${env.socks_proxy}|g' ../ngraph/.ci/onnx/onnxruntime/proxy.patch
grep -q "${env.http_proxy}" ../ngraph/.ci/onnx/onnxruntime/proxy.patch
git apply ../ngraph/.ci/onnx/onnxruntime/proxy.patch
"""
}
}
def
BuildAndTest
(){
dir
(
"onnxruntime"
){
sh
"mkdir -p `pwd`/build/models && chmod 777 `pwd`/build/models"
sh
"""
#!/bin/bash
./tools/ci_build/github/linux/run_dockerbuild.sh \
-o ubuntu16.04 \
-d ngraph \
-r `pwd`/build -x '--use_ngraph --use_full_protobuf --test_data_url https://onnxruntimetestdata.blob.core.windows.net/models/20190327.zip --test_data_checksum 45166d81c021c8aae212b53c92101792'
"""
}
}
def
Clean
(){
deleteDir
()
}
node
(
LABEL
)
{
main
()
}
.ci/onnx/onnxruntime/proxy.patch
0 → 100644
View file @
18bf3162
diff --git a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu
index bdff95e1..cd9c0008 100644
--- a/tools/ci_build/github/linux/docker/Dockerfile.ubuntu
+++ b/tools/ci_build/github/linux/docker/Dockerfile.ubuntu
@@ -3,6 +3,18 @@ FROM ubuntu:${OS_VERSION}
ARG PYTHON_VERSION=3.5
+ENV http_proxy={HTTP_PROXY}
+ENV socks_proxy={SOCKS_PROXY}
+ENV https_proxy={HTTP_PROXY}
+ENV ftp_proxy={HTTP_PROXY}
+ENV rsync_proxy={HTTP_PROXY}
+ENV no_proxy=intel.com,.intel.com,localhost
+ENV HTTP_PROXY={HTTP_PROXY}
+ENV HTTPS_PROXY={HTTP_PROXY}
+ENV FTP_PROXY={HTTP_PROXY}
+ENV SOCKS_PROXY={SOCKS_PROXY}
+ENV NO_PROXY=intel.com,.intel.com,localhost
+
ADD scripts /tmp/scripts
RUN /tmp/scripts/install_ubuntu.sh -p ${PYTHON_VERSION} && /tmp/scripts/install_deps.sh && rm -rf /tmp/scripts
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment