未验证 提交 6c93190a 编写于 作者: B barriery 提交者: GitHub

Merge branch 'develop' into add-nvidia-wiki-to-docker-images-doc

...@@ -235,15 +235,11 @@ class Server(object): ...@@ -235,15 +235,11 @@ class Server(object):
self.bin_path = os.environ["SERVING_BIN"] self.bin_path = os.environ["SERVING_BIN"]
def check_cuda(self): def check_cuda(self):
cuda_flag = False if os.system("ls /dev/ | grep nvidia > /dev/null") == 0:
r = os.popen("ldd {} | grep cudart".format(self.bin_path)) pass
r = r.read().split("=") else:
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:
raise SystemExit( 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): def set_gpuid(self, gpuid=0):
......
numpy>=1.12, <=1.16.4 ; python_version<"3.5" numpy>=1.12, <=1.16.4 ; python_version<"3.5"
opencv-python==4.2.0.32
google>=2.0.3 google>=2.0.3
protobuf>=3.12.2 protobuf>=3.12.2
grpcio-tools>=1.28.1 grpcio-tools>=1.28.1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册