Skip to content

C++部署问题 #1

@gaoyi-ai

Description

@gaoyi-ai

环境:

compile.sh:
构建成功

mkdir -p build
cd build
rm -rf *

DEMO_NAME=main

WITH_MKL=ON
WITH_GPU=ON
USE_TENSORRT=OFF

LIB_DIR=/home/yi/Libs/paddle_inference/
CUDNN_LIB=/usr/lib/x86_64-linux-gnu/
CUDA_LIB=/usr/local/cuda-11.7/lib64/
TENSORRT_ROOT=/home/yi/Libs/TensorRT-8.5.3.1
CUSTOM_OPERATOR_FILES="custom_ops/voxelize_op.cu;custom_ops/voxelize_op.cc;custom_ops/iou3d_nms_kernel.cu;custom_ops/postprocess.cc;custom_ops/postprocess.cu"


cmake .. -DPADDLE_LIB=${LIB_DIR} \
  -DWITH_MKL=${WITH_MKL} \
  -DDEMO_NAME=${DEMO_NAME} \
  -DWITH_GPU=${WITH_GPU} \
  -DWITH_STATIC_LIB=OFF \
  -DUSE_TENSORRT=${USE_TENSORRT} \
  -DCUDNN_LIB=${CUDNN_LIB} \
  -DCUDA_LIB=${CUDA_LIB} \
  -DTENSORRT_ROOT=${TENSORRT_ROOT} \
  -DCUSTOM_OPERATOR_FILES=${CUSTOM_OPERATOR_FILES}

make -j

Error Message:

yi@ubuntu20:~/apollo-model-centerpoint/deploy/centerpoint/cpp$ ./build/main --model_file /home/yi/Documents/paddle/center_point_paddle/center_point_paddle/centerpoint.pdmodel --params_file /home/yi/Documents/paddle/center_point_paddle/center_point_paddle/centerpoint.pdiparams --lidar_file /media/yi/SHARESSD/ParisLuco/ParisLuco/00/frames/frame_09343.ply --num_point_dim 4
./build/main: error while loading shared libraries: libpaddle2onnx.so.1.0.0rc2: cannot open shared object file: No such file or directory

抱歉打扰了,我在测试C++部署时遇到了以上问题。不清楚这个静态库是那一步没安装上。

非常感谢这个开源项目,非常感谢您为这个项目花费的时间和精力。

update:
构建时应该是paddle_lib库没有被正确link,感觉main的体积很小,构建时也很快。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions