dabc82eb by 周伟奇

fix docker bug

1 parent c2013d8a
......@@ -53,7 +53,7 @@ fi
TRITON_CONTAINER_ENVS=()
TRITON_ENVS_OPTION=""
if (( ${#TRITON_CONTAINER_ENVS[@]} > 0 )); then
TRITON_ENVS_OPTION="$(getOption "-env" ${TRITON_CONTAINER_ENVS[@]})"
TRITON_ENVS_OPTION="$(getOption "--env" ${TRITON_CONTAINER_ENVS[@]})"
fi
# -v
TRITON_CONTAINER_MODEL_DIR=/models
......@@ -89,7 +89,7 @@ BACKEND_CONTAINER_ENVS=(
)
BACKEND_ENVS_OPTION=""
if (( ${#BACKEND_CONTAINER_ENVS[@]} > 0 )); then
BACKEND_ENVS_OPTION="$(getOption "-env" ${BACKEND_CONTAINER_ENVS[@]})"
BACKEND_ENVS_OPTION="$(getOption "--env" ${BACKEND_CONTAINER_ENVS[@]})"
fi
# -v
BACKEND_CONTAINER_VOLUMES=(
......
......@@ -9,10 +9,10 @@ function _docker_run(){
if [ ${run_type} = "up" ]; then
# 启动部署用的container
all_options = "-d --net=bridge ${input_options} --name ${container_name} ${image}"
all_options="-d --net=bridge ${input_options} --name ${container_name} ${image}"
else
# 创建debug用的container
all_options = "-it --rm --net=bridge ${input_options} --entrypoint=/bin/bash ${image}"
all_options="-it --rm --net=bridge ${input_options} --entrypoint=/bin/bash ${image}"
fi
_notify INFO "run image ${image} with options: ${all_options}"
......@@ -49,7 +49,6 @@ function _is_image_exists(){
function _start(){
echo $@
local image_name=$1
local container_name=$2
local input_options=$3
......@@ -61,7 +60,7 @@ function _start(){
_notify WARNING "image <${image_name}> does not exist"
_load ${load_file}
fi
_docker_run "up" ${image_name} ${container_name} ${input_options}
_docker_run "up" ${image_name} ${container_name} "${input_options}"
else
docker start "${container_id=}"
fi
......
......@@ -4,7 +4,7 @@ set -euo pipefail
# 日志目录
LOG_BASE_DIR=${BASE_DIR}/logs
# 端口
# 端口
BACKEND_PORT=80
TRITON_HTTP_PORT=8000
TRITON_GRPC_PORT=8001
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!