Yuliang Fang
commited on
Commit
·
04108ec
1
Parent(s):
0168051
add rest files
Browse files- model_repository/postprocessing +1 -0
- model_repository/preprocessing +1 -0
- model_repository/turbomind +1 -0
- service_docker_up.sh +87 -0
model_repository/postprocessing
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
../triton_models/postprocessing
|
model_repository/preprocessing
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
../triton_models/preprocessing
|
model_repository/turbomind
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
../triton_models/interactive
|
service_docker_up.sh
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/sh
|
2 |
+
|
3 |
+
show_help() {
|
4 |
+
echo "Usage: $0 [-h] [--help] [-l] [--lib-dir]"
|
5 |
+
echo
|
6 |
+
echo "Options:"
|
7 |
+
echo " -h, --help Show this help message and exit"
|
8 |
+
echo " --lib-dir Specify the directory of turbomind libraries"
|
9 |
+
}
|
10 |
+
|
11 |
+
# check if '-h' or '--help' in the arguments
|
12 |
+
for arg in "$@"
|
13 |
+
do
|
14 |
+
if [ "$arg" == "-h" ] || [ "$arg" == "--help" ]; then
|
15 |
+
show_help
|
16 |
+
exit 0
|
17 |
+
fi
|
18 |
+
done
|
19 |
+
|
20 |
+
|
21 |
+
TP=1
|
22 |
+
DEVICES="0"
|
23 |
+
for ((i = 1; i < ${TP}; ++i)); do
|
24 |
+
DEVICES="${DEVICES},$i"
|
25 |
+
done
|
26 |
+
DEVICES="\"device=${DEVICES}\""
|
27 |
+
|
28 |
+
|
29 |
+
SCRIPT_DIR="$(dirname "$0")"
|
30 |
+
SCRIPT_ABS_DIR="$(realpath "$SCRIPT_DIR")"
|
31 |
+
|
32 |
+
|
33 |
+
if [ -z "$1" ]; then
|
34 |
+
docker run \
|
35 |
+
--gpus $DEVICES \
|
36 |
+
--rm \
|
37 |
+
-v "${SCRIPT_ABS_DIR}":/workspace/models \
|
38 |
+
--shm-size 16g \
|
39 |
+
-p 33336:22 \
|
40 |
+
-p 33337-33400:33337-33400 \
|
41 |
+
--cap-add=SYS_PTRACE \
|
42 |
+
--cap-add=SYS_ADMIN \
|
43 |
+
--security-opt seccomp=unconfined \
|
44 |
+
--name lmdeploy \
|
45 |
+
-it --env NCCL_LAUNCH_MODE=GROUP openmmlab/lmdeploy:latest \
|
46 |
+
tritonserver \
|
47 |
+
--model-repository=/workspace/models/model_repository \
|
48 |
+
--allow-http=0 \
|
49 |
+
--allow-grpc=1 \
|
50 |
+
--grpc-port=33337 \
|
51 |
+
--log-verbose=0 \
|
52 |
+
--allow-metrics=1
|
53 |
+
fi
|
54 |
+
|
55 |
+
for ((i = 1; i <= $#; i++)); do
|
56 |
+
arg=${!i}
|
57 |
+
case "$arg" in
|
58 |
+
--lib-dir)
|
59 |
+
if [ "$i" -eq "$#" ]; then
|
60 |
+
show_help
|
61 |
+
exit -1
|
62 |
+
fi
|
63 |
+
LIB_PATH=${@:i+1:1}
|
64 |
+
docker run \
|
65 |
+
--gpus $DEVICES \
|
66 |
+
--rm \
|
67 |
+
-v "${LIB_PATH}":/opt/tritonserver/backends/turbomind \
|
68 |
+
-v ""${SCRIPT_ABS_DIR}"":/workspace/models \
|
69 |
+
--shm-size 16g \
|
70 |
+
-p 33336:22 \
|
71 |
+
-p 33337-33400:33337-33400 \
|
72 |
+
--cap-add=SYS_PTRACE \
|
73 |
+
--cap-add=SYS_ADMIN \
|
74 |
+
--security-opt seccomp=unconfined \
|
75 |
+
--name lmdeploy \
|
76 |
+
-it --env NCCL_LAUNCH_MODE=GROUP openmmlab/lmdeploy:latest \
|
77 |
+
tritonserver \
|
78 |
+
--model-repository=/workspace/models/model_repository \
|
79 |
+
--allow-http=0 \
|
80 |
+
--allow-grpc=1 \
|
81 |
+
--grpc-port=33337 \
|
82 |
+
--log-verbose=0 \
|
83 |
+
--allow-metrics=1
|
84 |
+
break
|
85 |
+
;;
|
86 |
+
esac
|
87 |
+
done
|