diff --git a/python/paddle_serving_server_gpu/__init__.py b/python/paddle_serving_server_gpu/__init__.py index 1d94bf3093e6d76b260f53acd0c799080627c0ab..becfbb20090799aaf40d79973964e497cf599436 100644 --- a/python/paddle_serving_server_gpu/__init__.py +++ b/python/paddle_serving_server_gpu/__init__.py @@ -235,15 +235,11 @@ class Server(object): self.bin_path = os.environ["SERVING_BIN"] def check_cuda(self): - cuda_flag = False - r = os.popen("ldd {} | grep cudart".format(self.bin_path)) - r = r.read().split("=") - if len(r) >= 2 and "cudart" in r[1] and os.system( - "ls /dev/ | grep nvidia > /dev/null") == 0: - cuda_flag = True - if not cuda_flag: + if os.system("ls /dev/ | grep nvidia > /dev/null") == 0: + pass + else: raise SystemExit( - "CUDA not found, please check your environment or use cpu version by \"pip install paddle_serving_server\"" + "GPU not found, please check your environment or use cpu version by \"pip install paddle_serving_server\"" ) def set_gpuid(self, gpuid=0): diff --git a/python/requirements.txt b/python/requirements.txt index 697b24fd4db6aff6b30913d8a5d23416dc208c80..19d18053504459b2e9c4d2d17cb0aa0243444186 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -1,4 +1,5 @@ numpy>=1.12, <=1.16.4 ; python_version<"3.5" +opencv-python==4.2.0.32 google>=2.0.3 protobuf>=3.12.2 grpcio-tools>=1.28.1