diff --git a/doc/RUN_IN_DOCKER.md b/doc/RUN_IN_DOCKER.md index fd29d718b5a6390e0d2efbb1df94437d5a3d556d..e7b25362d113b18f6e779ccb9b92a3e3c8d13343 100644 --- a/doc/RUN_IN_DOCKER.md +++ b/doc/RUN_IN_DOCKER.md @@ -6,6 +6,8 @@ Docker (GPU version requires nvidia-docker to be installed on the GPU machine) +This document takes Python2 as an example to show how to run Paddle Serving in docker. You can also use Python3 to run related commands by replacing `python` with `python3`. + ## CPU ### Get docker image diff --git a/doc/RUN_IN_DOCKER_CN.md b/doc/RUN_IN_DOCKER_CN.md index c6f31cac6b1e644d6ac1e52323164169830bddd5..3e84cf08c015b7fda0d957bf621173ec18c19498 100644 --- a/doc/RUN_IN_DOCKER_CN.md +++ b/doc/RUN_IN_DOCKER_CN.md @@ -6,6 +6,8 @@ Docker(GPU版本需要在GPU机器上安装nvidia-docker) +该文档以Python2为例展示如何在Docker中运行Paddle Serving,您也可以通过将`python`更换成`python3`来用Python3运行相关命令。 + ## CPU版本 ### 获取镜像 diff --git a/tools/Dockerfile b/tools/Dockerfile index a39ce5bb76e411edeb94766d0c9aae23c6e7e62f..69b9b8bec4be49d6d4b1a5d8eb3fe5550ac1fa15 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -3,6 +3,7 @@ FROM centos:7.3.1611 RUN yum -y install wget && \ yum -y install epel-release && yum -y install patchelf && \ yum -y install gcc make python-devel && \ + yum -y install python3 python3-devel && \ yum clean all && \ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ python get-pip.py && rm get-pip.py diff --git a/tools/Dockerfile.gpu b/tools/Dockerfile.gpu index 091f4a546b549a3dd53645e78ab49b1cd46bf5b3..a08bdf3daef103b5944df192fef967ebd9772b6c 100644 --- a/tools/Dockerfile.gpu +++ b/tools/Dockerfile.gpu @@ -6,6 +6,7 @@ RUN yum -y install wget && \ yum -y install libSM-1.2.2-2.el7.x86_64 --setopt=protected_multilib=false && \ yum -y install libXrender-0.9.10-1.el7.x86_64 --setopt=protected_multilib=false && \ yum -y install libXext-1.3.3-3.el7.x86_64 --setopt=protected_multilib=false && \ + yum -y install python3 python3-devel && \ yum clean all && \ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ python get-pip.py && rm get-pip.py && \