diff --git a/cmake/paddle_inference.cmake b/cmake/paddle_inference.cmake index 4c4b06b00..13ad4d994 100644 --- a/cmake/paddle_inference.cmake +++ b/cmake/paddle_inference.cmake @@ -69,7 +69,7 @@ else() else() set(PADDLEINFERENCE_FILE "paddle_inference-linux-x64-${PADDLEINFERENCE_VERSION}.tgz") if(WITH_GPU) - set(PADDLEINFERENCE_FILE "paddle_inference-linux-x64-gpu-${PADDLEINFERENCE_VERSION}.tgz") + set(PADDLEINFERENCE_FILE "paddle_inference-linux-x64-gpu-trt-${PADDLEINFERENCE_VERSION}.tgz") endif() endif() endif() diff --git a/python/scripts/process_libraries.py.in b/python/scripts/process_libraries.py.in index f647e3d65..31fb56ed0 100644 --- a/python/scripts/process_libraries.py.in +++ b/python/scripts/process_libraries.py.in @@ -124,7 +124,7 @@ def process_on_mac(current_dir): for command in commands: assert os.system( command) == 0, "command execute failed! command: {}".format( - command) + command) def process_on_windows(current_dir): libs_path = os.path.join(current_dir, "fastdeploy", "libs") @@ -182,13 +182,21 @@ def process_libraries(current_dir): if f.count(flt) > 0: remain = False filename = os.path.split(f)[-1] - if filename in [ - "libnvinfer_plugin.so", "libnvinfer_plugin.so.8.4.1", - "libnvinfer.so", "libnvinfer.so.8.4.1", "libnvonnxparser.so", - "libnvonnxparser.so.8.4.1", "libnvparsers.so", - "libnvparsers.so.8.4.1" - ]: - continue +# Note(zhoushunjie): To add the trt libs below will increase the size of whl package by 450M. +# if filename in [ +# "libnvinfer_plugin.so", +# "libnvinfer.so", "libnvonnxparser.so", +# "libnvparsers.so", "libnvcaffe_parser.so" +# ]: +# continue + + for lib_prefix in ["libnvinfer_plugin.so.8.", + "libnvinfer.so.8.", "libnvonnxparser.so.8.", + "libnvparsers.so.8.", "libnvcaffe_parser.so.8."]: + if filename.startswith(lib_prefix): + remain = False + break + if remain: package_data.append( os.path.relpath(f, os.path.join(current_dir, "fastdeploy")))