Skip to content

Commit 6361ee7

Browse files
zxk114pymumu
authored andcommitted
add clang-tidy & fix tensorrt install issue
1 parent a135309 commit 6361ee7

8 files changed

+55
-45
lines changed

.github/workflows/publish-modelbox-images.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env:
1313

1414
jobs:
1515
compile_cuda112_trt_ubuntu:
16-
runs-on: ubuntu-20.04
16+
runs-on: ubuntu-latest
1717
container: modelbox/modelbox-develop-tensorrt_8.4.2-cuda_11.2-ubuntu-x86_64
1818
outputs:
1919
CUDA_VER: ${{ steps.env.outputs.CUDA_VER }}
@@ -62,7 +62,7 @@ jobs:
6262
path: artifact
6363

6464
build_cuda112_trt_ubuntu_develop_image:
65-
runs-on: ubuntu-18.04
65+
runs-on: ubuntu-22.04
6666
needs: compile_cuda112_trt_ubuntu
6767
steps:
6868
- name: Checkout
@@ -100,7 +100,7 @@ jobs:
100100
${{ needs.compile_cuda112_trt_ubuntu.outputs.IMAGE_NAME_DEV }}:${{ env.IMAGE_VERSION }}
101101
102102
build_cuda112_trt_ubuntu_runtime_image:
103-
runs-on: ubuntu-18.04
103+
runs-on: ubuntu-22.04
104104
needs: compile_cuda112_trt_ubuntu
105105
steps:
106106
- name: Checkout
@@ -157,7 +157,7 @@ jobs:
157157
make unittest
158158
159159
compile_cuda112_tf_ubuntu:
160-
runs-on: ubuntu-20.04
160+
runs-on: ubuntu-latest
161161
container: modelbox/modelbox-develop-tensorflow_2.6.0-cuda_11.2-ubuntu-x86_64
162162
outputs:
163163
CUDA_VER: ${{ steps.env.outputs.CUDA_VER }}
@@ -206,7 +206,7 @@ jobs:
206206
path: artifact
207207

208208
build_cuda112_tf_ubuntu_develop_image:
209-
runs-on: ubuntu-18.04
209+
runs-on: ubuntu-22.04
210210
needs: compile_cuda112_tf_ubuntu
211211
steps:
212212
- name: Checkout
@@ -244,7 +244,7 @@ jobs:
244244
${{ needs.compile_cuda112_tf_ubuntu.outputs.IMAGE_NAME_DEV }}:${{ env.IMAGE_VERSION }}
245245
246246
build_cuda112_tf_ubuntu_runtime_image:
247-
runs-on: ubuntu-18.04
247+
runs-on: ubuntu-22.04
248248
needs: compile_cuda112_tf_ubuntu
249249
steps:
250250
- name: Checkout
@@ -282,7 +282,7 @@ jobs:
282282
${{ needs.compile_cuda112_tf_ubuntu.outputs.IMAGE_NAME_RUN }}:${{ env.IMAGE_VERSION }}
283283
284284
test_cuda112_tf_ubuntu:
285-
runs-on: ubuntu-20.04
285+
runs-on: ubuntu-latest
286286
needs: [compile_cuda112_tf_ubuntu,build_cuda112_tf_ubuntu_develop_image]
287287
container:
288288
image: ${{ needs.compile_cuda112_tf_ubuntu.outputs.IMAGE_NAME_DEV }}:${{ github.event.inputs.version }}
@@ -301,7 +301,7 @@ jobs:
301301
make unittest
302302
303303
compile_cuda102_trt_ubuntu:
304-
runs-on: ubuntu-20.04
304+
runs-on: ubuntu-latest
305305
container: modelbox/modelbox-develop-tensorrt_7.1.3-cuda_10.2-ubuntu-x86_64
306306
outputs:
307307
CUDA_VER: ${{ steps.env.outputs.CUDA_VER }}
@@ -350,7 +350,7 @@ jobs:
350350
path: artifact
351351

352352
build_cuda102_trt_ubuntu_develop_image:
353-
runs-on: ubuntu-18.04
353+
runs-on: ubuntu-22.04
354354
needs: compile_cuda102_trt_ubuntu
355355
steps:
356356
- name: Checkout
@@ -388,7 +388,7 @@ jobs:
388388
${{ needs.compile_cuda102_trt_ubuntu.outputs.IMAGE_NAME_DEV }}:${{ env.IMAGE_VERSION }}
389389
390390
build_cuda102_trt_ubuntu_runtime_image:
391-
runs-on: ubuntu-18.04
391+
runs-on: ubuntu-22.04
392392
needs: compile_cuda102_trt_ubuntu
393393
steps:
394394
- name: Checkout
@@ -445,7 +445,7 @@ jobs:
445445
make unittest
446446
447447
compile_cuda102_torch_ubuntu:
448-
runs-on: ubuntu-20.04
448+
runs-on: ubuntu-latest
449449
container: modelbox/modelbox-develop-libtorch_1.9.1-cuda_10.2-ubuntu-x86_64
450450
outputs:
451451
CUDA_VER: ${{ steps.env.outputs.CUDA_VER }}
@@ -494,7 +494,7 @@ jobs:
494494
path: artifact
495495

496496
build_cuda102_torch_ubuntu_develop_image:
497-
runs-on: ubuntu-18.04
497+
runs-on: ubuntu-22.04
498498
needs: compile_cuda102_torch_ubuntu
499499
steps:
500500
- name: Checkout
@@ -532,7 +532,7 @@ jobs:
532532
${{ needs.compile_cuda102_torch_ubuntu.outputs.IMAGE_NAME_DEV }}:${{ env.IMAGE_VERSION }}
533533
534534
build_cuda102_torch_ubuntu_runtime_image:
535-
runs-on: ubuntu-18.04
535+
runs-on: ubuntu-22.04
536536
needs: compile_cuda102_torch_ubuntu
537537
steps:
538538
- name: Checkout
@@ -589,7 +589,7 @@ jobs:
589589
make unittest
590590
591591
compile_x86d_ubuntu:
592-
runs-on: ubuntu-20.04
592+
runs-on: ubuntu-latest
593593
container: modelbox/modelbox-develop-mindspore_1.6.1-cann_5.0.4-ubuntu-x86_64
594594
outputs:
595595
IMAGE_NAME_DEV: ${{ steps.env.outputs.IMAGE_NAME_DEV }}
@@ -626,7 +626,7 @@ jobs:
626626
path: artifact
627627

628628
build_x86d_ubuntu_develop_image:
629-
runs-on: ubuntu-18.04
629+
runs-on: ubuntu-22.04
630630
needs: compile_x86d_ubuntu
631631
steps:
632632
- name: Checkout
@@ -657,7 +657,7 @@ jobs:
657657
${{ needs.compile_x86d_ubuntu.outputs.IMAGE_NAME_DEV }}:${{ env.IMAGE_VERSION }}
658658
659659
build_x86d_ubuntu_runtime_image:
660-
runs-on: ubuntu-18.04
660+
runs-on: ubuntu-22.04
661661
needs: compile_x86d_ubuntu
662662
steps:
663663
- name: Checkout
@@ -823,7 +823,7 @@ jobs:
823823
make unittest
824824
825825
compile_cuda112_trt_openeuler:
826-
runs-on: ubuntu-20.04
826+
runs-on: ubuntu-latest
827827
container: modelbox/modelbox-develop-tensorrt_8.4.2-cuda_11.2-openeuler-x86_64
828828
outputs:
829829
CUDA_VER: ${{ steps.env.outputs.CUDA_VER }}
@@ -967,7 +967,7 @@ jobs:
967967
make unittest
968968
969969
compile_cuda112_tf_openeuler:
970-
runs-on: ubuntu-20.04
970+
runs-on: ubuntu-latest
971971
container: modelbox/modelbox-develop-tensorflow_2.6.0-cuda_11.2-openeuler-x86_64
972972
outputs:
973973
CUDA_VER: ${{ steps.env.outputs.CUDA_VER }}
@@ -1111,7 +1111,7 @@ jobs:
11111111
make unittest
11121112
11131113
compile_cuda102_trt_openeuler:
1114-
runs-on: ubuntu-20.04
1114+
runs-on: ubuntu-latest
11151115
container: modelbox/modelbox-develop-tensorrt_7.1.3-cuda_10.2-openeuler-x86_64
11161116
outputs:
11171117
CUDA_VER: ${{ steps.env.outputs.CUDA_VER }}
@@ -1255,7 +1255,7 @@ jobs:
12551255
make unittest
12561256
12571257
compile_cuda102_torch_openeuler:
1258-
runs-on: ubuntu-20.04
1258+
runs-on: ubuntu-latest
12591259
container: modelbox/modelbox-develop-libtorch_1.9.1-cuda_10.2-openeuler-x86_64
12601260
outputs:
12611261
CUDA_VER: ${{ steps.env.outputs.CUDA_VER }}
@@ -1399,7 +1399,7 @@ jobs:
13991399
make unittest
14001400
14011401
compile_x86d_openeuler:
1402-
runs-on: ubuntu-20.04
1402+
runs-on: ubuntu-latest
14031403
container: modelbox/modelbox-develop-mindspore_1.6.1-cann_5.0.4-openeuler-x86_64
14041404
outputs:
14051405
IMAGE_NAME_DEV: ${{ steps.env.outputs.IMAGE_NAME_DEV }}

docker/Dockerfile.ascend.develop.ubuntu

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shang
4444
build-essential unzip ffmpeg sudo bash vim gdb git doxygen autoconf cmake gettext openssh-server \
4545
pkg-config kmod net-tools pciutils libssl-dev libcpprest-dev libswscale-dev libavformat-dev \
4646
graphviz libgraphviz-dev libfuse-dev libprotobuf-c-dev protobuf-c-compiler duktape-dev \
47-
libopenblas-dev netcat clang clang-tidy && \
47+
libopenblas-dev netcat clang clang-tidy-10 && \
48+
ln -sf clang-tidy-10 /usr/bin/clang-tidy && ln -sf run-clang-tidy-10 /usr/bin/run-clang-tidy && \
4849
rm -f /usr/bin/python3 /usr/bin/python && \
4950
update-alternatives --install /usr/bin/python python /usr/bin/python3.7 100 && \
5051
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 100 && \

docker/Dockerfile.cuda.develop.openeuler

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ RUN mkdir -p /root/.pip && \
5353
RUN if [ "${CUDA_VERSION}" = "10.2" ]; then \
5454
dnn_ver="8.0.0.180-1.cuda10.2"; \
5555
elif [ "${CUDA_VERSION}" = "11.2" ]; then \
56-
dnn_ver="8.4.1.50-1.cuda11.6"; \
56+
dnn_ver="8.4.1.50-1.cuda11.6";fi && \
5757
dnf install -y --nogpgcheck --setopt=obsoletes=0 \
58-
libcudnn8-devel-${dnn_ver};fi && \
58+
libcudnn8-${dnn_ver} \
59+
libcudnn8-devel-${dnn_ver} && \
5960
if [ -n "${TF_VERSION}" ]; then \
6061
curl -LO https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.6.0.tar.gz && \
6162
tar zxf libtensorflow-gpu-linux-x86_64-2.6.0.tar.gz -C /usr/local/ && \

docker/Dockerfile.cuda.develop.ubuntu

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@ RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shang
1818
apt update && apt upgrade -y && \
1919
apt install -y python3.7-dev python3-pip python3-apt python3-setuptools && \
2020
apt install -y \
21-
dbus systemd systemd-cron iproute2 gnupg2 curl libcurl4-openssl-dev ca-certificates netcat clang \
21+
dbus systemd systemd-cron iproute2 gnupg2 curl libcurl4-openssl-dev ca-certificates \
2222
build-essential unzip ffmpeg sudo bash vim gdb git doxygen autoconf cmake gettext openssh-server \
2323
pkg-config kmod net-tools pciutils libgtk-3-dev libprotobuf-c-dev protobuf-c-compiler duktape-dev \
24-
libssl-dev libcpprest-dev libswscale-dev libavformat-dev graphviz libgraphviz-dev libfuse-dev && \
24+
libssl-dev libcpprest-dev libswscale-dev libavformat-dev graphviz libgraphviz-dev libfuse-dev \
25+
netcat clang clang-tidy-10 && \
26+
ln -sf clang-tidy-10 /usr/bin/clang-tidy && ln -sf run-clang-tidy-10 /usr/bin/run-clang-tidy && \
2527
rm -f /usr/bin/python3 /usr/bin/python && \
2628
update-alternatives --install /usr/bin/python python /usr/bin/python3.7 100 && \
2729
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 100 && \
@@ -56,11 +58,12 @@ RUN mkdir -p /root/.pip && \
5658

5759
RUN apt update && \
5860
if [ "${CUDA_VERSION}" = "10.2" ]; then \
59-
dnn_ver="8.0.0.180-1+cuda10.2"; \
61+
dnn_ver="8=8.0.0.180-1+cuda10.2"; \
6062
elif [ "${CUDA_VERSION}" = "11.2" ]; then \
61-
dnn_ver="8.4.1.50-1+cuda11.6"; \
63+
dnn_ver="8=8.4.1.50-1+cuda11.6";fi && \
6264
apt install -y --no-install-recommends \
63-
libcudnn8-dev=${dnn_ver};fi && \
65+
libcudnn${dnn_ver} \
66+
libcudnn${dnn_ver%=*}-dev=${dnn_ver#*=} && \
6467
if [ -n "${TF_VERSION}" ]; then \
6568
curl -LO https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.6.0.tar.gz && \
6669
tar zxf libtensorflow-gpu-linux-x86_64-2.6.0.tar.gz -C /usr/local/ && \
@@ -71,15 +74,20 @@ RUN apt update && \
7174
cp -af libtorch/* /usr/local/; \
7275
elif [ -n "${TRT_VERSION}" ]; then \
7376
if [ "${TRT_VERSION}" = "7.1.3.4" ]; then \
74-
trt_ver="7.1.3-1+cuda10.2"; \
77+
trt_ver="7=7.1.3-1+cuda10.2"; \
7578
elif [ "${TRT_VERSION}" = "8.4.2.4" ]; then \
76-
trt_ver="8.4.2-1+cuda11.6";fi && \
79+
trt_ver="8=8.4.2-1+cuda11.6";fi && \
7780
apt install -y --no-install-recommends \
78-
libnvinfer-dev=${trt_ver} \
79-
libnvonnxparsers-dev=${trt_ver} \
80-
libnvparsers-dev=${trt_ver} \
81-
libnvinfer-plugin-dev=${trt_ver} \
82-
python3-libnvinfer-dev=${trt_ver};fi && \
81+
libnvinfer${trt_ver} \
82+
libnvinfer-dev=${trt_ver#*=} \
83+
libnvparsers${trt_ver} \
84+
libnvparsers-dev=${trt_ver#*=} \
85+
libnvonnxparsers${trt_ver} \
86+
libnvonnxparsers-dev=${trt_ver#*=} \
87+
libnvinfer-plugin${trt_ver} \
88+
libnvinfer-plugin-dev=${trt_ver#*=} \
89+
python3-libnvinfer=${trt_ver#*=} \
90+
python3-libnvinfer-dev=${trt_ver#*=};fi && \
8391
rm -rf /var/lib/apt/lists/* /root/*
8492

8593
RUN python3 -m pip install --no-cache-dir /opt/release/python/modelbox-*.whl && \

docker/Dockerfile.cuda.runtime.openeuler

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ RUN mkdir -p /root/.pip && \
4343
RUN if [ "${CUDA_VERSION}" = "10.2" ]; then \
4444
dnn_ver="8.0.0.180-1.cuda10.2"; \
4545
elif [ "${CUDA_VERSION}" = "11.2" ]; then \
46-
dnn_ver="8.4.1.50-1.cuda11.6"; \
46+
dnn_ver="8.4.1.50-1.cuda11.6";fi && \
4747
dnf install -y --nogpgcheck --setopt=obsoletes=0 \
48-
libcudnn8-${dnn_ver};fi && \
48+
libcudnn8-${dnn_ver} && \
4949
if [ -n "${TF_VERSION}" ]; then \
5050
curl -LO https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.6.0.tar.gz && \
5151
tar zxf libtensorflow-gpu-linux-x86_64-2.6.0.tar.gz -C /usr/local/ && \

docker/Dockerfile.cuda.runtime.ubuntu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ RUN apt update && \
4949
if [ "${CUDA_VERSION}" = "10.2" ]; then \
5050
dnn_ver="8.0.0.180-1+cuda10.2"; \
5151
elif [ "${CUDA_VERSION}" = "11.2" ]; then \
52-
dnn_ver="8.4.1.50-1+cuda11.6"; \
52+
dnn_ver="8.4.1.50-1+cuda11.6";fi && \
5353
apt install -y --no-install-recommends \
54-
libcudnn8=${dnn_ver};fi && \
54+
libcudnn8=${dnn_ver} && \
5555
if [ -n "${TF_VERSION}" ]; then \
5656
curl -LO https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.6.0.tar.gz && \
5757
tar zxf libtensorflow-gpu-linux-x86_64-2.6.0.tar.gz -C /usr/local/ && \
@@ -66,7 +66,7 @@ RUN apt update && \
6666
libnvonnxparsers${trt_ver} \
6767
libnvparsers${trt_ver} \
6868
libnvinfer-plugin${trt_ver} \
69-
python3-libnvinfer${trt_ver#8}; \
69+
python3-libnvinfer=${trt_ver#*=}; \
7070
elif [ -n "${TORCH_VERSION}" ]; then \
7171
curl -LO https://download.pytorch.org/libtorch/cu102/libtorch-cxx11-abi-shared-with-deps-1.9.1%2Bcu102.zip && \
7272
unzip libtorch-*.zip -d /root >/dev/null 2>&1 && \

docker/prepare_for_dev.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ download() {
2525
}
2626

2727
if [ "$(arch)" == "x86_64" ];then
28-
if [ "$VERSION_ID" == "18.04" ];then
28+
if [ "$VERSION_ID" == "22.04" ];then
2929
download https://github.com/modelbox-ai/modelbox-binary/releases/download/BinaryArchive/opencv_4.2.0_dev-ubuntu.tar.gz
3030
download https://github.com/modelbox-ai/modelbox-binary/releases/download/BinaryArchive/obssdk_3.22.3_dev-ubuntu.tar.gz
3131
elif [ "$VERSION_ID" == "20.04" ];then
@@ -38,7 +38,7 @@ if [ "$(arch)" == "x86_64" ];then
3838
download https://github.com/modelbox-ai/modelbox-binary/releases/download/BinaryArchive/nlohmann-json_3.7.3.tar.gz
3939
download https://github.com/modelbox-ai/modelbox-binary/releases/download/BinaryArchive/Video_Codec_SDK_9.1.23.tar.gz
4040
elif [ "$(arch)" == "aarch64" ];then
41-
if [ "$VERSION_ID" == "18.04" ];then
41+
if [ "$VERSION_ID" == "22.04" ];then
4242
download http://download.modelbox-ai.com/third-party/aarch64/opencv_4.2.0_dev-ubuntu.tar.gz
4343
download http://download.modelbox-ai.com/third-party/aarch64/obssdk_3.22.3_dev-ubuntu.tar.gz
4444
elif [ "$VERSION_ID" == "20.03" ];then

docker/prepare_for_run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ download() {
2525
}
2626

2727
if [ "$(arch)" == "x86_64" ];then
28-
if [ "$VERSION_ID" == "18.04" ];then
28+
if [ "$VERSION_ID" == "22.04" ];then
2929
download https://github.com/modelbox-ai/modelbox-binary/releases/download/BinaryArchive/opencv_4.2.0-ubuntu.tar.gz
3030
download https://github.com/modelbox-ai/modelbox-binary/releases/download/BinaryArchive/obssdk_3.22.3-ubuntu.tar.gz
3131
elif [ "$VERSION_ID" == "20.04" ];then
@@ -36,7 +36,7 @@ if [ "$(arch)" == "x86_64" ];then
3636
download https://github.com/modelbox-ai/modelbox-binary/releases/download/BinaryArchive/obssdk_3.22.3.tar.gz
3737
fi
3838
elif [ "$(arch)" == "aarch64" ];then
39-
if [ "$VERSION_ID" == "18.04" ];then
39+
if [ "$VERSION_ID" == "22.04" ];then
4040
download http://download.modelbox-ai.com/third-party/aarch64/opencv_4.2.0-ubuntu.tar.gz
4141
download http://download.modelbox-ai.com/third-party/aarch64/obssdk_3.22.3-ubuntu.tar.gz
4242
elif [ "$VERSION_ID" == "20.03" ];then

0 commit comments

Comments
 (0)