mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-12 20:11:20 +08:00
Fix some bugs for CI (#155)
* Update README.md * Update README.md * Update README.md * Create README.md * Update README.md * Update README.md * Update README.md * Update README.md * Add evaluation calculate time and fix some bugs * Update classification __init__ * Move to ppseg * Add segmentation doc * Add PaddleClas infer.py * Update PaddleClas infer.py * Delete .infer.py.swp * Add PaddleClas infer.cc * Update README.md * Update README.md * Update README.md * Update infer.py * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Add PaddleSeg doc and infer.cc demo * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Create segmentation_result.md * Update README.md * Update segmentation_result.md * Update segmentation_result.md * Update segmentation_result.md * Update classification and detection evaluation function * Fix python grammar bug * Add PPSeg evaluation function * Add average_inference_time function * Update PaddleSeg example infer.py Tensorrt setting * Fix bug for CI convert os.system to subprocess.popen * Fix tensorrt cann't link to *.so * Fix tensorrt can't find so bug * Update CMakeLists * Update CMakeLists * Update CMakeLists * Update CMakeLists Co-authored-by: Jason <jiangjiajun@baidu.com> Co-authored-by: felixhjh <852142024@example.com>
This commit is contained in:
@@ -215,6 +215,14 @@ if(ENABLE_TRT_BACKEND)
|
|||||||
find_package(Python COMPONENTS Interpreter Development REQUIRED)
|
find_package(Python COMPONENTS Interpreter Development REQUIRED)
|
||||||
message(STATUS "Copying ${TRT_DIRECTORY}/lib to ${CMAKE_CURRENT_BINARY_DIR}/third_libs/install/tensorrt/lib ...")
|
message(STATUS "Copying ${TRT_DIRECTORY}/lib to ${CMAKE_CURRENT_BINARY_DIR}/third_libs/install/tensorrt/lib ...")
|
||||||
execute_process(COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/copy_directory.py ${TRT_DIRECTORY}/lib ${CMAKE_CURRENT_BINARY_DIR}/third_libs/install/tensorrt/lib)
|
execute_process(COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/copy_directory.py ${TRT_DIRECTORY}/lib ${CMAKE_CURRENT_BINARY_DIR}/third_libs/install/tensorrt/lib)
|
||||||
|
if(UNIX)
|
||||||
|
execute_process(COMMAND sh -c "ls *.so*" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/third_libs/install/tensorrt/lib
|
||||||
|
COMMAND sh -c "xargs patchelf --set-rpath '$ORIGIN'" WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/third_libs/install/tensorrt/lib
|
||||||
|
RESULT_VARIABLE result
|
||||||
|
OUTPUT_VARIABLE curr_out
|
||||||
|
ERROR_VARIABLE curr_out)
|
||||||
|
message(STATUS "result:${result} out:${curr_out}")
|
||||||
|
endif()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@@ -32,8 +32,8 @@ def build_option(args):
|
|||||||
|
|
||||||
if args.use_trt:
|
if args.use_trt:
|
||||||
option.use_trt_backend()
|
option.use_trt_backend()
|
||||||
option.set_trt_input_shape("inputs", [1, 3, 224, 224],
|
option.set_trt_input_shape("x", [1, 3, 256, 256], [1, 3, 1024, 1024],
|
||||||
[1, 3, 224, 224], [1, 3, 224, 224])
|
[1, 3, 2048, 2048])
|
||||||
return option
|
return option
|
||||||
|
|
||||||
|
|
||||||
|
12
setup.py
12
setup.py
@@ -421,8 +421,9 @@ if sys.argv[1] == "install" or sys.argv[1] == "bdist_wheel":
|
|||||||
print(command)
|
print(command)
|
||||||
# The sw_64 not suppot patchelf, so we just disable that.
|
# The sw_64 not suppot patchelf, so we just disable that.
|
||||||
if platform.machine() != 'sw_64' and platform.machine() != 'mips64':
|
if platform.machine() != 'sw_64' and platform.machine() != 'mips64':
|
||||||
assert os.system(
|
assert subprocess.Popen(
|
||||||
command) == 0, "patchelf {} failed, the command: {}".format(
|
command,
|
||||||
|
shell=True) != 0, "patchelf {} failed, the command: {}".format(
|
||||||
command, pybind_so_file)
|
command, pybind_so_file)
|
||||||
elif platform.system().lower() == "darwin":
|
elif platform.system().lower() == "darwin":
|
||||||
pre_commands = [
|
pre_commands = [
|
||||||
@@ -451,12 +452,13 @@ if sys.argv[1] == "install" or sys.argv[1] == "bdist_wheel":
|
|||||||
path)) + pybind_so_file)
|
path)) + pybind_so_file)
|
||||||
for command in pre_commands:
|
for command in pre_commands:
|
||||||
try:
|
try:
|
||||||
os.system(command)
|
subprocess.Popen(command, shell=True)
|
||||||
except:
|
except:
|
||||||
print("Skip execute command: " + command)
|
print("Skip execute command: " + command)
|
||||||
for command in commands:
|
for command in commands:
|
||||||
assert os.system(
|
assert subprocess.Popen(
|
||||||
command) == 0, "command execute failed! command: {}".format(
|
command,
|
||||||
|
shell=True) != 0, "command execute failed! command: {}".format(
|
||||||
command)
|
command)
|
||||||
|
|
||||||
all_files = get_all_files(os.path.join(PACKAGE_NAME, "libs"))
|
all_files = get_all_files(os.path.join(PACKAGE_NAME, "libs"))
|
||||||
|
Reference in New Issue
Block a user