Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
周伟奇
/
situ-ocr
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
91320a84
authored
2022-11-23 11:19:28 +0800
by
周伟奇
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
backend net host
1 parent
52ea5210
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
bin/conf.sh
bin/docker.sh
bin/conf.sh
View file @
91320a8
...
...
@@ -86,6 +86,7 @@ TRITON_OPTIONS="${TRITON_ENVS_OPTION} ${TRITON_VOLUMES_OPTION} ${TRITON_PORTS_OP
# -env
BACKEND_CONTAINER_ENVS
=(
"WORKER_NUM=
${
BACKEND_WORKER_NUM
}
"
"BACKEND_PORT=
${
BACKEND_PORT
}
"
)
BACKEND_ENVS_OPTION
=
""
if
((
${#
BACKEND_CONTAINER_ENVS
[@]
}
> 0
))
;
then
...
...
@@ -102,15 +103,13 @@ if (( ${#BACKEND_CONTAINER_VOLUMES[@]} > 0 )); then
BACKEND_VOLUMES_OPTION
=
"
$(
getOption
"-v"
${
BACKEND_CONTAINER_VOLUMES
[@]
})
"
fi
# -p
BACKEND_CONTAINER_PORTS
=(
"
${
BACKEND_PORT
}
:80"
)
BACKEND_CONTAINER_PORTS
=()
BACKEND_PORTS_OPTION
=
""
if
((
${#
BACKEND_CONTAINER_PORTS
[@]
}
> 0
))
;
then
BACKEND_PORTS_OPTION
=
"
$(
getOption
"-p"
${
BACKEND_CONTAINER_PORTS
[@]
})
"
fi
# -env -v -p
BACKEND_OPTIONS
=
"
${
BACKEND_ENVS_OPTION
}
${
BACKEND_VOLUMES_OPTION
}
${
BACKEND_PORTS_OPTION
}
"
BACKEND_OPTIONS
=
"
--net=host
${
BACKEND_ENVS_OPTION
}
${
BACKEND_VOLUMES_OPTION
}
${
BACKEND_PORTS_OPTION
}
"
function
checkTritonOption
()
{
if
((
${#
TRITON_CONTAINER_ENVS
[@]
}
> 0
))
;
then
...
...
bin/docker.sh
View file @
91320a8
...
...
@@ -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
${
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
${
input_options
}
--entrypoint=/bin/bash
${
image
}
"
fi
_notify INFO
"run image
${
image
}
with options:
${
all_options
}
"
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment