-
Notifications
You must be signed in to change notification settings - Fork 67
/
.travis.yml
125 lines (116 loc) · 4.14 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
language: cpp
compiler:
- gcc
os: linux
dist: bionic
addons:
apt:
packages:
- "python3"
- "python3-pip"
- "python3-dev"
cache:
pip: true
jobs:
include:
- name: "CUDA 10.0 + TRT 7.0 + Torch 1.7"
env:
- CUDA=10.0.130-1
- CUDA_SHORT=10.0
- CUDNN_MAJOR=7
- CUDNN=7.6.5.*
- TENSORRT=7.0.0
- UBUNTU_VERSION=ubuntu1804
- TORCH=1.7.0
- TENSORFLOW=1.15.0
- ENABLE_TORCH=ON
- ENABLE_TENSORFLOW=OFF
- ENABLE_KERAS=OFF
- ENABLE_ONNX=OFF
- name: "CUDA 10.2 + TRT 7.2 + Torch 1.8"
env:
- CUDA=10.2.89-1
- CUDA_SHORT=10.2
- CUDNN_MAJOR=8
- CUDNN=8.0.4.*
- TENSORRT=7.2.3
- UBUNTU_VERSION=ubuntu1804
- TORCH=1.8.0
- TENSORFLOW=1.15.0
- ENABLE_TORCH=ON
- ENABLE_TENSORFLOW=OFF
- ENABLE_KERAS=OFF
- ENABLE_ONNX=OFF
- name: "CUDA 10.2 + TRT 7.2 + TensorFlow 1.15"
env:
- CUDA=10.2.89-1
- CUDA_SHORT=10.2
- CUDNN_MAJOR=8
- CUDNN=8.0.4.*
- TENSORRT=7.2.3
- UBUNTU_VERSION=ubuntu1804
- TORCH=1.8.0
- TENSORFLOW=1.15.0
- ENABLE_TORCH=OFF
- ENABLE_TENSORFLOW=ON
- ENABLE_KERAS=OFF
- ENABLE_ONNX=OFF
- name: "CUDA 10.2 + TRT 7.2 + Keras"
env:
- CUDA=10.2.89-1
- CUDA_SHORT=10.2
- CUDNN_MAJOR=8
- CUDNN=8.0.4.*
- TENSORRT=7.2.3
- UBUNTU_VERSION=ubuntu1804
- TORCH=1.8.0
- TENSORFLOW=1.15.0
- ENABLE_TORCH=OFF
- ENABLE_TENSORFLOW=OFF
- ENABLE_KERAS=ON
- ENABLE_ONNX=OFF
- name: "CUDA 10.2 + TRT 7.2 + ONNX"
env:
- CUDA=10.2.89-1
- CUDA_SHORT=10.2
- CUDNN_MAJOR=8
- CUDNN=8.0.4.*
- TENSORRT=7.2.3
- UBUNTU_VERSION=ubuntu1804
- TORCH=1.8.0
- TENSORFLOW=1.15.0
- ENABLE_TORCH=OFF
- ENABLE_TENSORFLOW=OFF
- ENABLE_KERAS=OFF
- ENABLE_ONNX=ON
before_install:
- INSTALLER=cuda-repo-${UBUNTU_VERSION}_${CUDA}_amd64.deb
- wget http://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/${INSTALLER}
- sudo dpkg -i ${INSTALLER}
- wget https://developer.download.nvidia.com/compute/cuda/repos/${UBUNTU_VERSION}/x86_64/7fa2af80.pub
- sudo apt-key add 7fa2af80.pub
- wget https://developer.download.nvidia.com/compute/machine-learning/repos/${UBUNTU_VERSION}/x86_64/nvidia-machine-learning-repo-${UBUNTU_VERSION}_1.0.0-1_amd64.deb
- sudo dpkg -i nvidia-machine-learning-repo-*.deb
- sudo apt update -qq
- sudo apt install -y cuda-core-${CUDA_SHORT/./-} cuda-cudart-dev-${CUDA_SHORT/./-} cuda-cufft-dev-${CUDA_SHORT/./-} cuda-compiler-${CUDA_SHORT/./-} cuda-libraries-dev-${CUDA_SHORT/./-} cuda-nvtx-${CUDA_SHORT/./-} cuda-compat-${CUDA_SHORT/./-}
- CUDNN_VERSION=${CUDNN}-1+cuda${CUDA_SHORT}
- sudo apt install -y libcudnn${CUDNN_MAJOR}=${CUDNN_VERSION} libcudnn${CUDNN_MAJOR}-dev=${CUDNN_VERSION}
- TENSORRT_VERSION=${TENSORRT}-1+cuda${CUDA_SHORT}
- sudo apt install -y libnvinfer7=${TENSORRT_VERSION} libnvonnxparsers7=${TENSORRT_VERSION} libnvparsers7=${TENSORRT_VERSION} libnvinfer-plugin7=${TENSORRT_VERSION} libnvinfer-dev=${TENSORRT_VERSION} libnvonnxparsers-dev=${TENSORRT_VERSION} libnvparsers-dev=${TENSORRT_VERSION} libnvinfer-plugin-dev=${TENSORRT_VERSION} python-libnvinfer=${TENSORRT_VERSION} python3-libnvinfer=${TENSORRT_VERSION}
- sudo apt clean
- CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
- LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
- PATH=${CUDA_HOME}/bin:${PATH}
install:
- pip3 install --user $(whoami) --upgrade pip
- pip3 install torch==${TORCH}+cpu -f https://download.pytorch.org/whl/torch_stable.html
before_script:
- wget https://github.com/Neargye/tensorflow/releases/download/v${TENSORFLOW}/libtensorflow-cpu-linux-x86_64-${TENSORFLOW}.tar.gz -O tensorflow.tar.gz
- mkdir tensorflow_lib
- tar -xzvf tensorflow.tar.gz --directory tensorflow_lib
- cp -rv tensorflow_lib/lib/ source/third_party/tensorflow/
- rm -rvf tensorflow_lib tensorflow.tar.gz
- mkdir build
- cd build
- cmake .. -DENABLE_TORCH=${ENABLE_TORCH} -DENABLE_TENSORFLOW=${ENABLE_TENSORFLOW} -DENABLE_KERAS=${ENABLE_KERAS} -DENABLE_ONNX=${ENABLE_ONNX} -DENABLE_PROFILING=ON -DENABLE_DYNAMIC_BATCH=ON -DENABLE_RNN=ON -DBUILD_PYTHON_LIB=ON -DPYTHON_EXECUTABLE=$(which python3)
script: make -j