From 1051cae1dffa6f5c80309dfe83fba67f4ed75f7a Mon Sep 17 00:00:00 2001 From: Hyunsu Philip Cho Date: Thu, 25 Jul 2019 01:36:25 +0000 Subject: [PATCH 1/3] Add a missing header in tvm dev branch --- container/Dockerfile.gpu | 1 + 1 file changed, 1 insertion(+) diff --git a/container/Dockerfile.gpu b/container/Dockerfile.gpu index 46983643c..1df0c6bf3 100644 --- a/container/Dockerfile.gpu +++ b/container/Dockerfile.gpu @@ -42,6 +42,7 @@ RUN mkdir -p /home/model-server && cd /home/model-server \ && git submodule update --init --recursive \ && cd 3rdparty/tvm \ && git checkout dev \ + && sed -i '1s;^;#include \n;' src/runtime/cuda/cuda_device_api.cc \ && cd ../.. \ && mkdir build && cd build && cmake .. -DUSE_CUDA=ON -DUSE_CUDNN=ON -DUSE_TENSORRT=/packages/TensorRT-5.0.2.6 \ && make -j15 && cd ../python && python3 setup.py bdist_wheel \ From 1651e518e42d882a41bb5961b7c2018d7422b0b9 Mon Sep 17 00:00:00 2001 From: Hyunsu Philip Cho Date: Thu, 25 Jul 2019 01:40:41 +0000 Subject: [PATCH 2/3] [CI] Build GPU container for image classification --- Jenkinsfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index dcf5247a7..5887a9c26 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ def cloudTargetMatrix = [ ] def inferenceContainerApps = [ - "xgboost", "image_classification" + ["xgboost", "cpu"], ["image_classification", "cpu"], ["image_classification", "gpu"] ] /* Pipeline definition */ @@ -61,7 +61,7 @@ pipeline { steps { script { parallel (inferenceContainerApps.collectEntries{ - [(it): { BuildInferenceContainer(it) } ] + [(it[0] + '-' + it[1]): { BuildInferenceContainer(it[0], it[1]) } ] }) } } @@ -155,14 +155,14 @@ def CloudInstallAndTest(cloudTarget) { } // Build DLR inference containers -def BuildInferenceContainer(app) { +def BuildInferenceContainer(app, target) { def nodeReq = "ubuntu && amd64 && cpu-build" node(nodeReq) { unstash name: 'srcs' - echo "Building inference container ${app}" + echo "Building inference container ${app} for target ${target}" sh """ cd container - docker build --build-arg APP=${app} -t ${app}-cpu -f Dockerfile.cpu . + docker build --build-arg APP=${app} -t ${app}-${target} -f Dockerfile.${target} . """ } } From f4b511529eaeba96e04fbdde851a025f06cad037 Mon Sep 17 00:00:00 2001 From: Philip Hyunsu Cho Date: Wed, 24 Jul 2019 19:11:58 -0700 Subject: [PATCH 3/3] Download TensorRT lib from a private S3 bucket --- Jenkinsfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 5887a9c26..62746c5fa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -160,6 +160,12 @@ def BuildInferenceContainer(app, target) { node(nodeReq) { unstash name: 'srcs' echo "Building inference container ${app} for target ${target}" + if (target == "gpu") { + // Download TensorRT library + s3Download(file: 'container/TensorRT-5.0.2.6.Ubuntu-18.04.1.x86_64-gnu.cuda-10.0.cudnn7.3.tar.gz', + bucket: 'neo-ai-dlr-jenkins-artifacts', + path: 'TensorRT-5.0.2.6.Ubuntu-18.04.1.x86_64-gnu.cuda-10.0.cudnn7.3.tar.gz') + } sh """ cd container docker build --build-arg APP=${app} -t ${app}-${target} -f Dockerfile.${target} .