Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Serving
提交
768ee9f5
S
Serving
项目概览
PaddlePaddle
/
Serving
大约 1 年 前同步成功
通知
186
Star
833
Fork
253
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
105
列表
看板
标记
里程碑
合并请求
10
Wiki
2
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Serving
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
105
Issue
105
列表
看板
标记
里程碑
合并请求
10
合并请求
10
Pages
分析
分析
仓库分析
DevOps
Wiki
2
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
768ee9f5
编写于
12月 23, 2021
作者:
J
Jiawei Wang
提交者:
GitHub
12月 23, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1575 from bjjwwang/develop
fix runtime docker gen
上级
0dbaae22
e6946160
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
9 addition
and
8 deletion
+9
-8
tools/generate_runtime_docker.sh
tools/generate_runtime_docker.sh
+9
-8
未找到文件。
tools/generate_runtime_docker.sh
浏览文件 @
768ee9f5
...
@@ -11,7 +11,7 @@ function usage
...
@@ -11,7 +11,7 @@ function usage
echo
" --python : python version, 3.6/3.7/3.8 "
;
echo
" --python : python version, 3.6/3.7/3.8 "
;
#echo " --serving : serving version(0.6.0/0.6.2)";
#echo " --serving : serving version(0.6.0/0.6.2)";
#echo " --paddle : paddle version(2.1.0/2.2.0)"
#echo " --paddle : paddle version(2.1.0/2.2.0)"
echo
" --image_name : image name(default serving_runtime:env-python)"
echo
" --image_name : image name(default serving_runtime:env-python)"
;
echo
" -h | --help : helper"
;
echo
" -h | --help : helper"
;
}
}
...
@@ -41,7 +41,7 @@ function parse_args
...
@@ -41,7 +41,7 @@ function parse_args
positional_2
=
"
${
args
[1]
}
"
positional_2
=
"
${
args
[1]
}
"
# validate required args
# validate required args
if
[[
-z
"
${
paddle
}
"
||
-z
"
${
env
}
"
||
-z
"
${
python
}
"
||
-z
"
${
serving
}
"
]]
;
then
if
[[
-z
"
${
env
}
"
||
-z
"
${
python
}
"
]]
;
then
echo
"Invalid arguments. paddle or env or python or serving is missing."
echo
"Invalid arguments. paddle or env or python or serving is missing."
usage
usage
exit
;
exit
;
...
@@ -57,6 +57,8 @@ function parse_args
...
@@ -57,6 +57,8 @@ function parse_args
function
run
function
run
{
{
python
=
"2.2.0"
serving
=
"0.7.0"
parse_args
"
$@
"
parse_args
"
$@
"
echo
"named arg: env:
$env
"
echo
"named arg: env:
$env
"
...
@@ -69,8 +71,6 @@ function run
...
@@ -69,8 +71,6 @@ function run
elif
[
$env
==
"cuda11.2"
]
;
then
elif
[
$env
==
"cuda11.2"
]
;
then
base_image
=
"nvidia
\/
cuda:11.2.0-cudnn8-runtime-ubuntu16.04"
base_image
=
"nvidia
\/
cuda:11.2.0-cudnn8-runtime-ubuntu16.04"
fi
fi
python
=
"2.2.0"
serving
=
"0.7.0"
echo
"base image:
$base_image
"
echo
"base image:
$base_image
"
echo
"named arg: python:
$python
"
echo
"named arg: python:
$python
"
echo
"named arg: serving:
$serving
"
echo
"named arg: serving:
$serving
"
...
@@ -78,7 +78,8 @@ function run
...
@@ -78,7 +78,8 @@ function run
echo
"named arg: image_name:
$image_name
"
echo
"named arg: image_name:
$image_name
"
sed
-e
"s/<<base_image>>/
$base_image
/g"
-e
"s/<<python_version>>/
$python
/g"
-e
"s/<<run_env>>/
$env
/g"
-e
"s/<<serving_version>>/
$serving
/g"
-e
"s/<<paddle_version>>/
$paddle
/g"
tools/Dockerfile.runtime_template
>
Dockerfile.tmp
sed
-e
"s/<<base_image>>/
$base_image
/g"
-e
"s/<<python_version>>/
$python
/g"
-e
"s/<<run_env>>/
$env
/g"
-e
"s/<<serving_version>>/
$serving
/g"
-e
"s/<<paddle_version>>/
$paddle
/g"
tools/Dockerfile.runtime_template
>
Dockerfile.tmp
docker build
--network
=
host
--build-arg
ftp_proxy
=
http://172.19.57.45:3128
--build-arg
https_proxy
=
http://172.19.57.45:3128
--build-arg
http_proxy
=
http://172.19.57.45:3128
--build-arg
HTTP_PROXY
=
http://172.19.57.45:3128
--build-arg
HTTPS_PROXY
=
http://172.19.57.45:3128
-t
$image_name
-f
Dockerfile.tmp
.
#docker build --network=host --build-arg ftp_proxy=http://172.19.57.45:3128 --build-arg https_proxy=http://172.19.57.45:3128 --build-arg http_proxy=http://172.19.57.45:3128 --build-arg HTTP_PROXY=http://172.19.57.45:3128 --build-arg HTTPS_PROXY=http://172.19.57.45:3128 -t $image_name -f Dockerfile.tmp .
docker build
-t
$image_name
-f
Dockerfile.tmp
.
}
}
run
"
$@
"
;
run
"
$@
"
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录