Commit 957e07c 1 parent 5f7013d commit 957e07c Copy full SHA for 957e07c
File tree 2 files changed +20
-16
lines changed
2 files changed +20
-16
lines changed Original file line number Diff line number Diff line change @@ -4,15 +4,21 @@ pipeline {
4
4
cron('H 22 * * 1-5')
5
5
}
6
6
stages {
7
- stage('Building docker images ') {
7
+ stage('Init ') {
8
8
steps {
9
9
script {
10
10
def common = load("ci/Jenkinsfile.common");
11
11
common.cancelPreviousBuilds();
12
12
}
13
- sh 'tools/build-docker-images.sh'
14
13
}
15
14
}
15
+ stage('Building docker images') {
16
+ parallel {
17
+ stage('cpu') { steps { sh 'tools/build-docker-images.sh cpu' } }
18
+ stage('gpu') { steps { sh 'tools/build-docker-images.sh gpu' } }
19
+ stage('gpu_tf') { steps { sh 'tools/build-docker-images.sh gpu_tf' } }
20
+ stage('gpu_tensort') { steps { sh 'tools/build-docker-images.sh gpu_tensorrt' } }
21
+ }
16
22
}
17
23
post {
18
24
always {
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ export DOCKER_BUILDKIT=1
4
+
3
5
set -e
4
- set -x
5
6
6
- export DOCKER_BUILDKIT=1
7
+ [ " ${JENKINS_URL} " ] && set -x
7
8
8
- selected=$1
9
+ if [ ! " $@ " ]; then
10
+ echo " usage: $( basename $0 ) [cpu|gpu|...]"
11
+ exit 1
12
+ fi
13
+ NAMES=" $@ "
9
14
10
15
declare -A TARGETS
11
16
TARGETS[cpu]=" cpu/default"
12
17
TARGETS[gpu]=" gpu/default"
13
18
TARGETS[gpu_tf]=" gpu/tf"
14
19
TARGETS[gpu_tensorrt]=" gpu_tensorrt/tensorrt"
15
20
16
- NAMES=${! TARGETS[@]}
17
- if [ " $1 " ]; then
18
- NAMES=" $1 "
19
- fi
20
-
21
21
if [ " $TAG_NAME " ]; then
22
22
TMP_TAG=" ci-$TAG_NAME "
23
23
elif [ " $GIT_BRANCH " == " master" ]; then
24
24
TMP_TAG=" ci-$GIT_BRANCH "
25
25
else
26
+ # Not built with Jenkins
26
27
TMP_TAG=" trash"
27
28
fi
28
29
29
- image_url_prefix_release=" jolibrain/deepdetect"
30
- image_url_prefix_ci=" ceres:5000/${image_url_prefix_release} "
31
- images_to_push=
30
+ image_url_prefix=" jolibrain/deepdetect"
32
31
33
32
for name in $NAMES ; do
34
33
target=${TARGETS[$name]}
@@ -39,11 +38,10 @@ for name in $NAMES; do
39
38
40
39
arch=${target%%/* }
41
40
build=${target##*/ }
42
- image_url_release=" ${image_url_prefix_release} _${name} "
43
- image_url_ci=" ${image_url_prefix_ci} _${name} "
41
+ image_url=" ${image_url_prefix} _${name} "
44
42
45
43
docker build \
46
- -t $image_url_ci :$TMP_TAG \
44
+ -t $image_url :$TMP_TAG \
47
45
--build-arg DEEPDETECT_BUILD=$build \
48
46
-f docker/${arch} .Dockerfile \
49
47
.
You can’t perform that action at this time.
0 commit comments