diff --git a/doc/RUN_IN_DOCKER.md b/doc/RUN_IN_DOCKER.md index 8a932fe1af844d2d5001b24edc0a2a816f5b6994..d4e8e5e4f9fdc3435f20888d9473545015f0c90e 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 a4676ced427784c2091e07b2690116020ac6657b..a66eea5baf7f7d32ed7502b3c5e094663f040dfa 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