Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
fc50e068
Commit
fc50e068
authored
Jul 16, 2018
by
Tianqi Chen
Committed by
GitHub
Jul 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CI] Switch to use prebuilt docker instead of build from scratch (#1442)
parent
82f78d1e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
24 deletions
+40
-24
Jenkinsfile
+18
-18
docker/bash.sh
+21
-5
tests/lint/pylintrc
+1
-1
No files found.
Jenkinsfile
View file @
fc50e068
...
...
@@ -11,7 +11,7 @@ tvm_multilib = "build/libtvm.so, " +
"build/libvta.so, build/libtvm_topi.so, build/libnnvm_compiler.so, "
+
tvm_runtime
// command to start a docker container
docker_run
=
'docker/b
uild
.sh'
docker_run
=
'docker/b
ash
.sh'
// timeout in minutes
max_time
=
60
...
...
@@ -39,7 +39,7 @@ stage("Sanity Check") {
node
(
'linux'
)
{
ws
(
'workspace/tvm/sanity'
)
{
init_git
()
sh
"${docker_run}
ci_
lint ./tests/scripts/task_lint.sh"
sh
"${docker_run}
tvmai/ci-
lint ./tests/scripts/task_lint.sh"
}
}
}
...
...
@@ -100,7 +100,7 @@ stage('Build') {
echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake
echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake
"""
make
(
'
ci_
gpu'
,
'build'
,
'-j2'
)
make
(
'
tvmai/ci-
gpu'
,
'build'
,
'-j2'
)
pack_lib
(
'gpu'
,
tvm_multilib
)
// compiler test
sh
"""
...
...
@@ -113,7 +113,7 @@ stage('Build') {
echo set\\(CMAKE_CXX_COMPILER clang-6.0\\) >> config.cmake
echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake
"""
make
(
'
ci_
gpu'
,
'build2'
,
'-j2'
)
make
(
'
tvmai/ci-
gpu'
,
'build2'
,
'-j2'
)
}
}
},
...
...
@@ -130,11 +130,11 @@ stage('Build') {
echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake
echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake
"""
make
(
'
ci_
cpu'
,
'build'
,
'-j2'
)
make
(
'
tvmai/ci-
cpu'
,
'build'
,
'-j2'
)
pack_lib
(
'cpu'
,
tvm_lib
)
timeout
(
time:
max_time
,
unit:
'MINUTES'
)
{
sh
"${docker_run}
ci_
cpu ./tests/scripts/task_cpp_unittest.sh"
sh
"${docker_run}
ci_
cpu ./tests/scripts/task_python_vta.sh"
sh
"${docker_run}
tvmai/ci-
cpu ./tests/scripts/task_cpp_unittest.sh"
sh
"${docker_run}
tvmai/ci-
cpu ./tests/scripts/task_python_vta.sh"
}
}
}
...
...
@@ -153,7 +153,7 @@ stage('Build') {
echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake
echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake
"""
make
(
'
ci_
i386'
,
'build'
,
'-j2'
)
make
(
'
tvmai/ci-
i386'
,
'build'
,
'-j2'
)
pack_lib
(
'i386'
,
tvm_multilib
)
}
}
...
...
@@ -167,7 +167,7 @@ stage('Unit Test') {
init_git
()
unpack_lib
(
'gpu'
,
tvm_multilib
)
timeout
(
time:
max_time
,
unit:
'MINUTES'
)
{
sh
"${docker_run}
ci_
gpu ./tests/scripts/task_python_unittest.sh"
sh
"${docker_run}
tvmai/ci-
gpu ./tests/scripts/task_python_unittest.sh"
}
}
}
...
...
@@ -178,9 +178,9 @@ stage('Unit Test') {
init_git
()
unpack_lib
(
'i386'
,
tvm_multilib
)
timeout
(
time:
max_time
,
unit:
'MINUTES'
)
{
sh
"${docker_run}
ci_
i386 ./tests/scripts/task_python_unittest.sh"
sh
"${docker_run}
ci_
i386 ./tests/scripts/task_python_integration.sh"
sh
"${docker_run}
ci_
i386 ./tests/scripts/task_python_vta.sh"
sh
"${docker_run}
tvmai/ci-
i386 ./tests/scripts/task_python_unittest.sh"
sh
"${docker_run}
tvmai/ci-
i386 ./tests/scripts/task_python_integration.sh"
sh
"${docker_run}
tvmai/ci-
i386 ./tests/scripts/task_python_vta.sh"
}
}
}
...
...
@@ -191,7 +191,7 @@ stage('Unit Test') {
init_git
()
unpack_lib
(
'gpu'
,
tvm_multilib
)
timeout
(
time:
max_time
,
unit:
'MINUTES'
)
{
sh
"${docker_run}
ci_
gpu ./tests/scripts/task_java_unittest.sh"
sh
"${docker_run}
tvmai/ci-
gpu ./tests/scripts/task_java_unittest.sh"
}
}
}
...
...
@@ -205,10 +205,10 @@ stage('Integration Test') {
init_git
()
unpack_lib
(
'gpu'
,
tvm_multilib
)
timeout
(
time:
max_time
,
unit:
'MINUTES'
)
{
sh
"${docker_run}
ci_
gpu ./tests/scripts/task_python_integration.sh"
sh
"${docker_run}
ci_
gpu ./tests/scripts/task_python_topi.sh"
sh
"${docker_run}
ci_
gpu ./tests/scripts/task_cpp_topi.sh"
sh
"${docker_run}
ci_
gpu ./tests/scripts/task_python_nnvm.sh"
sh
"${docker_run}
tvmai/ci-
gpu ./tests/scripts/task_python_integration.sh"
sh
"${docker_run}
tvmai/ci-
gpu ./tests/scripts/task_python_topi.sh"
sh
"${docker_run}
tvmai/ci-
gpu ./tests/scripts/task_cpp_topi.sh"
sh
"${docker_run}
tvmai/ci-
gpu ./tests/scripts/task_python_nnvm.sh"
}
}
}
...
...
@@ -219,7 +219,7 @@ stage('Integration Test') {
init_git
()
unpack_lib
(
'gpu'
,
tvm_multilib
)
timeout
(
time:
max_time
,
unit:
'MINUTES'
)
{
sh
"${docker_run}
ci_
gpu ./tests/scripts/task_python_docs.sh"
sh
"${docker_run}
tvmai/ci-
gpu ./tests/scripts/task_python_docs.sh"
}
pack_lib
(
'mydocs'
,
'docs.tgz'
)
}
...
...
docker/bash.sh
View file @
fc50e068
...
...
@@ -3,15 +3,28 @@
# Start a bash, mount /workspace to be current directory.
#
# Usage: docker/bash.sh <CONTAINER_NAME>
# Starts an interactive session
#
# Usage2: docker/bash.sh <CONTAINER_NAME> [COMMAND]
# Execute command in the docker image, non-interactive
#
if
[
"$#"
-lt
1
]
;
then
echo
"Usage: docker/bash.sh <CONTAINER_NAME>"
echo
"Usage: docker/bash.sh <CONTAINER_NAME>
[COMMAND]
"
exit
-1
fi
DOCKER_IMAGE_NAME
=(
"
$1
"
)
if
[
"$#"
-eq
1
]
;
then
COMMAND
=
"bash"
CI_DOCKER_EXTRA_PARAMS
=(
"-it --net=host"
)
else
shift
1
COMMAND
=(
"
$@
"
)
fi
SCRIPT_DIR
=
"
$(
cd
"
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
"
&&
pwd
)
"
WORKSPACE
=
"
$(
pwd
)
"
DOCKER_IMAGE_NAME
=
$1
# Use nvidia-docker if the container is GPU.
if
[[
"
${
DOCKER_IMAGE_NAME
}
"
==
*
"gpu"
*
]]
;
then
...
...
@@ -22,14 +35,16 @@ fi
# Print arguments.
echo
"WORKSPACE:
${
WORKSPACE
}
"
echo
"DOCKER CONTAINER NAME:
${
DOCKER_IM
G
_NAME
}
"
echo
"DOCKER CONTAINER NAME:
${
DOCKER_IM
AGE
_NAME
}
"
echo
""
echo
"Running '
${
COMMAND
[@]
}
' inside
${
DOCKER_IMAGE_NAME
}
..."
# By default we cleanup - remove the container once it finish running (--rm)
# and share the PID namespace (--pid=host) so the process inside does not have
# pid 1 and SIGKILL is propagated to the process inside (jenkins can kill it).
echo
${
DOCKER_BINARY
}
${
DOCKER_BINARY
}
run
--rm
-
it
--pid
=
host
--net
=
host
\
${
DOCKER_BINARY
}
run
--rm
-
-pid
=
host
\
-v
${
WORKSPACE
}
:/workspace
\
-v
${
SCRIPT_DIR
}
:/docker
\
-w
/workspace
\
...
...
@@ -38,6 +53,7 @@ ${DOCKER_BINARY} run --rm -it --pid=host --net=host\
-e
"CI_BUILD_UID=
$(
id
-u
)
"
\
-e
"CI_BUILD_GROUP=
$(
id
-g
-n
)
"
\
-e
"CI_BUILD_GID=
$(
id
-g
)
"
\
${
CI_DOCKER_EXTRA_PARAMS
[@]
}
\
${
DOCKER_IMAGE_NAME
}
\
bash /docker/with_the_same_user
\
bash
${
COMMAND
[@]
}
tests/lint/pylintrc
View file @
fc50e068
...
...
@@ -65,7 +65,7 @@ enable=indexing-exception,old-raise-syntax
# --enable=similarities". If you want to run only the classes checker, but have
# no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W"
disable=design,similarities,no-self-use,attribute-defined-outside-init,locally-disabled,star-args,pointless-except,bad-option-value,global-statement,fixme,suppressed-message,useless-suppression,locally-enabled,no-member,no-name-in-module,import-error,unsubscriptable-object,unbalanced-tuple-unpacking,undefined-variable,protected-access
disable=design,similarities,no-self-use,attribute-defined-outside-init,locally-disabled,star-args,pointless-except,bad-option-value,global-statement,fixme,suppressed-message,useless-suppression,locally-enabled,no-member,no-name-in-module,import-error,unsubscriptable-object,unbalanced-tuple-unpacking,undefined-variable,protected-access
,useless-object-inheritance
[REPORTS]
...
...
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