From 35d7b1f5f233c101b2a4ac28d3deacbd428f1581 Mon Sep 17 00:00:00 2001
From: HydrogenSulfate <490868991@qq.com>
Date: Mon, 20 Jun 2022 20:22:15 +0800
Subject: [PATCH] restore faiss installtion

---
 test_tipc/docs/test_serving_infer_python.md | 3 +++
 test_tipc/prepare.sh                        | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/test_tipc/docs/test_serving_infer_python.md b/test_tipc/docs/test_serving_infer_python.md
index 42f1e7718..1ba4c1516 100644
--- a/test_tipc/docs/test_serving_infer_python.md
+++ b/test_tipc/docs/test_serving_infer_python.md
@@ -60,6 +60,9 @@ Linux GPU/CPU PYTHON 服务化部署测试的主程序为`test_serving_infer_pyt
   python3.7 -m pip install paddle-serving-app==0.9.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
   python3.7 -m pip install install paddle-serving-server-gpu==0.9.0.post101 -i https://pypi.tuna.tsinghua.edu.cn/simple
 
+  # 测试PP-ShiTu识别模型时需安装faiss包
+  python3.7-m pip install faiss-cpu==1.7.1post2 -i https://pypi.tuna.tsinghua.edu.cn/simple
+
   # 下载模型与数据
   bash test_tipc/prepare.sh test_tipc/configs/ResNet50/ResNet50_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt serving_infer
   ```
diff --git a/test_tipc/prepare.sh b/test_tipc/prepare.sh
index 740ffd468..0d12e18d9 100644
--- a/test_tipc/prepare.sh
+++ b/test_tipc/prepare.sh
@@ -209,7 +209,6 @@ if [[ ${MODE} = "serving_infer" ]]; then
     # prepare serving env
     python_name=$(func_parser_value "${lines[2]}")
     if [[ ${model_name} =~ "ShiTu" ]]; then
-        ${python_name} -m pip install faiss-cpu==1.7.1post2 -i https://pypi.tuna.tsinghua.edu.cn/simple
         cls_inference_model_url=$(func_parser_value "${lines[3]}")
         cls_tar_name=$(func_get_url_file_name "${cls_inference_model_url}")
         det_inference_model_url=$(func_parser_value "${lines[4]}")