Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Add Ubuntu CUDA 10.2 to container and update TRT job
Browse files Browse the repository at this point in the history
Signed-off-by: Serge Panev <[email protected]>
  • Loading branch information
Kh4L committed Jul 29, 2020
1 parent deffb00 commit 57eff5c
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 9 deletions.
13 changes: 11 additions & 2 deletions ci/docker/Dockerfile.build.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
build-essential \
ninja-build \
git \
protobuf-compiler \
libprotobuf-dev \
clang-6.0 \
clang-tidy-6.0 \
python-yaml \
Expand Down Expand Up @@ -83,6 +81,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
pandoc \
## Build-dependencies for ccache 3.7.9
autoconf \
autogen \
libtool \
gperf \
libb2-dev \
libzstd-dev && \
Expand Down Expand Up @@ -110,6 +110,15 @@ COPY install/requirements /work/
RUN python3 -m pip install cmake==3.16.6 && \
python3 -m pip install -r /work/requirements

RUN git clone --recursive -b 3.5.1.1 https://github.com/google/protobuf.git && \
cd protobuf && \
./autogen.sh && \
./configure && \
make -j$(nproc) install && \
cd .. && \
rm -rf protobuf && \
ldconfig

ARG USER_ID=0
COPY install/docker_filepermissions.sh /work/
RUN /work/docker_filepermissions.sh
Expand Down
10 changes: 10 additions & 0 deletions ci/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@ services:
BASE_IMAGE: nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
cache_from:
- ${DOCKER_CACHE_REGISTRY}/build.ubuntu_gpu_cu101:latest
ubuntu_gpu_cu102:
image: ${DOCKER_CACHE_REGISTRY}/build.ubuntu_gpu_cu102:latest
build:
context: .
dockerfile: Dockerfile.build.ubuntu
target: gpu
args:
BASE_IMAGE: nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
cache_from:
- ${DOCKER_CACHE_REGISTRY}/build.ubuntu_gpu_cu102:latest
ubuntu_build_cuda:
image: ${DOCKER_CACHE_REGISTRY}/build.ubuntu_build_cuda:latest
build:
Expand Down
15 changes: 9 additions & 6 deletions ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ build_ubuntu_gpu_tensorrt() {

export CC=gcc-7
export CXX=g++-7
export ONNX_NAMESPACE=onnx

# Build ONNX
pushd .
Expand All @@ -552,22 +553,24 @@ build_ubuntu_gpu_tensorrt() {
rm -rf build
mkdir -p build
cd build
cmake -DBUILD_SHARED_LIBS=ON -GNinja ..
ninja onnx/onnx-ml.proto
ninja
cmake -DCMAKE_CXX_FLAGS=-I/usr/include/python${PYVER} -DBUILD_SHARED_LIBS=ON ..
make -j$(nproc) install
ldconfig
export LIBRARY_PATH=`pwd`:`pwd`/onnx/:$LIBRARY_PATH
export CPLUS_INCLUDE_PATH=`pwd`:$CPLUS_INCLUDE_PATH
export CXXFLAGS=-I`pwd`

popd

# Build ONNX-TensorRT
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.1/targets/x86_64-linux/include/
export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:/usr/local/cuda-10.2/targets/x86_64-linux/include/
pushd .
cd 3rdparty/onnx-tensorrt/
mkdir -p build
cd build
cmake ..
make -j$(nproc)
cmake -DONNX_NAMESPACE=$ONNX_NAMESPACE ..
make -j$(nproc) install
export LIBRARY_PATH=`pwd`:$LIBRARY_PATH
popd

Expand Down
2 changes: 1 addition & 1 deletion ci/jenkins/Jenkins_steps.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def compile_unix_tensorrt_gpu(lib_name) {
ws('workspace/build-tensorrt') {
timeout(time: max_time, unit: 'MINUTES') {
utils.init_git()
utils.docker_run('ubuntu_gpu_cu101', 'build_ubuntu_gpu_tensorrt', false)
utils.docker_run('ubuntu_gpu_cu102', 'build_ubuntu_gpu_tensorrt', false)
utils.pack_lib(lib_name, mx_tensorrt_lib)
}
}
Expand Down

0 comments on commit 57eff5c

Please sign in to comment.