From f3bf21052c9a592d36df3aef91463bac3871c6f9 Mon Sep 17 00:00:00 2001 From: barrierye Date: Wed, 25 Mar 2020 20:35:48 +0800 Subject: [PATCH] fix RUN_IN_DOCKER doc --- doc/RUN_IN_DOCKER.md | 6 ++++++ doc/RUN_IN_DOCKER_CN.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/doc/RUN_IN_DOCKER.md b/doc/RUN_IN_DOCKER.md index 8a932fe1..d4e8e5e4 100644 --- a/doc/RUN_IN_DOCKER.md +++ b/doc/RUN_IN_DOCKER.md @@ -43,6 +43,12 @@ pip install paddle-serving-server ### Test example +Before running the GPU version of the Server side code, you need to set the `CUDA_VISIBLE_DEVICES` environment variable to specify which GPUs the prediction service uses. The following example specifies two GPUs with indexes 0 and 1: + +```bash +export CUDA_VISIBLE_DEVICES=0,1 +``` + Get the trained Boston house price prediction model by the following command: ```bash diff --git a/doc/RUN_IN_DOCKER_CN.md b/doc/RUN_IN_DOCKER_CN.md index a4676ced..a66eea5b 100644 --- a/doc/RUN_IN_DOCKER_CN.md +++ b/doc/RUN_IN_DOCKER_CN.md @@ -127,6 +127,12 @@ pip install paddle-serving-server-gpu ### 测试example +GPU版本在运行Server端代码前需要设置`CUDA_VISIBLE_DEVICES`环境变量来指定预测服务使用的GPU,下面的示例为指定索引为0和1两块GPU: + +```bash + export CUDA_VISIBLE_DEVICES=0,1 +``` + 通过下面命令获取训练好的Boston房价预估模型: ```bash -- GitLab