fix docker bug
Showing
3 changed files
with
6 additions
and
7 deletions
... | @@ -53,7 +53,7 @@ fi | ... | @@ -53,7 +53,7 @@ fi |
53 | TRITON_CONTAINER_ENVS=() | 53 | TRITON_CONTAINER_ENVS=() |
54 | TRITON_ENVS_OPTION="" | 54 | TRITON_ENVS_OPTION="" |
55 | if (( ${#TRITON_CONTAINER_ENVS[@]} > 0 )); then | 55 | if (( ${#TRITON_CONTAINER_ENVS[@]} > 0 )); then |
56 | TRITON_ENVS_OPTION="$(getOption "-env" ${TRITON_CONTAINER_ENVS[@]})" | 56 | TRITON_ENVS_OPTION="$(getOption "--env" ${TRITON_CONTAINER_ENVS[@]})" |
57 | fi | 57 | fi |
58 | # -v | 58 | # -v |
59 | TRITON_CONTAINER_MODEL_DIR=/models | 59 | TRITON_CONTAINER_MODEL_DIR=/models |
... | @@ -89,7 +89,7 @@ BACKEND_CONTAINER_ENVS=( | ... | @@ -89,7 +89,7 @@ BACKEND_CONTAINER_ENVS=( |
89 | ) | 89 | ) |
90 | BACKEND_ENVS_OPTION="" | 90 | BACKEND_ENVS_OPTION="" |
91 | if (( ${#BACKEND_CONTAINER_ENVS[@]} > 0 )); then | 91 | if (( ${#BACKEND_CONTAINER_ENVS[@]} > 0 )); then |
92 | BACKEND_ENVS_OPTION="$(getOption "-env" ${BACKEND_CONTAINER_ENVS[@]})" | 92 | BACKEND_ENVS_OPTION="$(getOption "--env" ${BACKEND_CONTAINER_ENVS[@]})" |
93 | fi | 93 | fi |
94 | # -v | 94 | # -v |
95 | BACKEND_CONTAINER_VOLUMES=( | 95 | BACKEND_CONTAINER_VOLUMES=( | ... | ... |
... | @@ -9,10 +9,10 @@ function _docker_run(){ | ... | @@ -9,10 +9,10 @@ function _docker_run(){ |
9 | 9 | ||
10 | if [ ${run_type} = "up" ]; then | 10 | if [ ${run_type} = "up" ]; then |
11 | # 启动部署用的container | 11 | # 启动部署用的container |
12 | all_options = "-d --net=bridge ${input_options} --name ${container_name} ${image}" | 12 | all_options="-d --net=bridge ${input_options} --name ${container_name} ${image}" |
13 | else | 13 | else |
14 | # 创建debug用的container | 14 | # 创建debug用的container |
15 | all_options = "-it --rm --net=bridge ${input_options} --entrypoint=/bin/bash ${image}" | 15 | all_options="-it --rm --net=bridge ${input_options} --entrypoint=/bin/bash ${image}" |
16 | fi | 16 | fi |
17 | 17 | ||
18 | _notify INFO "run image ${image} with options: ${all_options}" | 18 | _notify INFO "run image ${image} with options: ${all_options}" |
... | @@ -49,7 +49,6 @@ function _is_image_exists(){ | ... | @@ -49,7 +49,6 @@ function _is_image_exists(){ |
49 | 49 | ||
50 | 50 | ||
51 | function _start(){ | 51 | function _start(){ |
52 | echo $@ | ||
53 | local image_name=$1 | 52 | local image_name=$1 |
54 | local container_name=$2 | 53 | local container_name=$2 |
55 | local input_options=$3 | 54 | local input_options=$3 |
... | @@ -61,7 +60,7 @@ function _start(){ | ... | @@ -61,7 +60,7 @@ function _start(){ |
61 | _notify WARNING "image <${image_name}> does not exist" | 60 | _notify WARNING "image <${image_name}> does not exist" |
62 | _load ${load_file} | 61 | _load ${load_file} |
63 | fi | 62 | fi |
64 | _docker_run "up" ${image_name} ${container_name} ${input_options} | 63 | _docker_run "up" ${image_name} ${container_name} "${input_options}" |
65 | else | 64 | else |
66 | docker start "${container_id=}" | 65 | docker start "${container_id=}" |
67 | fi | 66 | fi | ... | ... |
... | @@ -4,7 +4,7 @@ set -euo pipefail | ... | @@ -4,7 +4,7 @@ set -euo pipefail |
4 | # 日志目录 | 4 | # 日志目录 |
5 | LOG_BASE_DIR=${BASE_DIR}/logs | 5 | LOG_BASE_DIR=${BASE_DIR}/logs |
6 | 6 | ||
7 | # 端口 | 7 | # 端口 |
8 | BACKEND_PORT=80 | 8 | BACKEND_PORT=80 |
9 | TRITON_HTTP_PORT=8000 | 9 | TRITON_HTTP_PORT=8000 |
10 | TRITON_GRPC_PORT=8001 | 10 | TRITON_GRPC_PORT=8001 | ... | ... |
-
Please register or sign in to post a comment