autowarefoundation / modelzoo

A collection of machine-learned models for use in autonomous driving applications.
https://www.autoware.org/
Apache License 2.0
62 stars 24 forks source link

Error while running yolo v2 tiny example pipeline #52

Closed LiyouZhou closed 3 years ago

LiyouZhou commented 3 years ago

While trying to compile and test the yolo v2 tiny model in autoware model zoo, we got the below error.

$ docker run \
>     -it --rm \
>     -v /tmp/.X11-unix:/tmp/.X11-unix:rw \
>     -v ${HOME}/.Xauthority:${HOME}/.Xauthority:rw \
>     -e XAUTHORITY=${HOME}/.Xauthority \
>     -e DISPLAY=$DISPLAY \
>     --net=host \
>     -v ${MODEL_DIR}:${MODEL_DIR} \
>     -w ${MODEL_DIR}/example_pipeline/build \
>     --entrypoint "" \
>     autoware/model-zoo-tvm-cli:bleedingedge \
>         ./example_pipeline
./example_pipeline: error while loading shared libraries: libtvm_runtime.so: cannot open shared object file: No such file or directory

We went through a Github issue, and instead of using the tag latest used bleadingedge docker image and also we switched to tag 1.0.0 instead of master. does not solve the problem.

LiyouZhou commented 3 years ago

workaround

docker run \
    -it --rm \
    -v /tmp/.X11-unix:/tmp/.X11-unix:rw \
    -v ${HOME}/.Xauthority:${HOME}/.Xauthority:rw \
    -e XAUTHORITY=${HOME}/.Xauthority \
    -e DISPLAY=$DISPLAY \
    --net=host \
    -v ${MODEL_DIR}:${MODEL_DIR} \
    -w ${MODEL_DIR}/example_pipeline/build \
    --entrypoint "" \
    autoware/model-zoo-tvm-cli:1.0.0 \
         bash -c "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ ./example_pipeline"
LiyouZhou commented 3 years ago

libtvm_runtime.so is in /usr/local/lib/, however it is not in the LD_LIBRARY_PATH. The docker file should be modified to add this folder to the LD_LIBRARY_PATH variable.

LucaFos commented 3 years ago

Fixed with 7539a00