提交 6f29f258 编写于 作者: W wangjiawei04

rename tools/dockerfile to tools/dockerfiles

上级 ad7b8f15
......@@ -6,11 +6,11 @@ RUN apt-get update && \
RUN apt-get update && \
apt-get install -y wget tar xz-utils bzip2 libcurl4-openssl-dev \
curl sed grep zlib1g-dev libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev && \
curl sed grep zlib1g-dev libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev && \
apt-get clean -y
WORKDIR /usr/bin
COPY tools/dockerfile/build_scripts /build_scripts
COPY tools/dockerfiles/build_scripts /build_scripts
RUN bash /build_scripts/install_gcc.sh gcc82 && rm -rf /build_scripts
RUN cp gcc gcc.bak && cp g++ g++.bak && rm gcc && rm g++
RUN ln -s /usr/local/gcc-8.2/bin/gcc /usr/local/bin/gcc
......@@ -21,18 +21,18 @@ WORKDIR /usr/bin
# install python
WORKDIR /home
COPY tools/dockerfile/build_scripts /build_scripts
COPY tools/dockerfiles/build_scripts /build_scripts
RUN bash /build_scripts/install_python.sh <<python_version>> && rm -rf /build_scripts
# Other
# install whl and bin
WORKDIR /home
COPY tools/dockerfile/build_scripts /build_scripts
COPY tools/dockerfiles/build_scripts /build_scripts
RUN bash /build_scripts/install_whl.sh 0.5.0 2.0.0 <<run_env>> <<python_version>> && rm -rf /build_scripts
# install tensorrt
WORKDIR /home
COPY tools/dockerfile/build_scripts /build_scripts
COPY tools/dockerfiles/build_scripts /build_scripts
RUN bash /build_scripts/install_trt.sh && rm -rf /build_scripts
# install go
......
......@@ -5,7 +5,7 @@ set -e
function usage
{
echo "usage: arg_parse_example -a AN_ARG -s SOME_MORE_ARGS [-y YET_MORE_ARGS || -h]"
echo "usage: sh tools/generate_runtime_docker.sh --SOME_ARG ARG_VALUE"
echo " ";
echo " --env : running env, cpu/cuda10.1/cuda10.2/cuda11";
echo " --python : python version, 2.7/3.6/3.7 ";
......@@ -42,7 +42,7 @@ function parse_args
# validate required args
if [[ -z "${paddle}" || -z "${env}" || -z "${python}" || -z "${serving}" ]]; then
echo "Invalid arguments"
echo "Invalid arguments. paddle or env or python or serving is missing."
usage
exit;
fi
......@@ -73,7 +73,7 @@ function run
echo "named arg: paddle: $paddle"
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" 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" tools/Dockerfile.runtime_template > Dockerfile.tmp
docker build --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 .
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册