install_third-party.sh 727 B

1234567891011121314151617181920212223242526272829303132333435
  1. # download third-part lib
  2. if [ ! -d "./deps" ]; then
  3. mkdir deps
  4. fi
  5. if [ ! -d "./deps/gflags" ]; then
  6. cd deps
  7. git clone https://github.com/gflags/gflags
  8. cd gflags
  9. cmake .
  10. make -j 8
  11. cd ..
  12. cd ..
  13. fi
  14. # install yaml
  15. YAML_URL=https://bj.bcebos.com/paddlex/deploy/deps/yaml-cpp.zip
  16. if [ ! -f "./deps/yaml-cpp.zip" ]; then
  17. cd deps
  18. wget -c ${YAML_URL}
  19. cd ..
  20. fi
  21. if [ "$ARCH" = "x86" ]; then
  22. OPENCV_URL=https://bj.bcebos.com/paddlex/deploy/x86opencv/opencv.tar.bz2
  23. else
  24. OPENCV_URL=https://bj.bcebos.com/paddlex/deploy/armlinux/opencv.tar.bz2
  25. fi
  26. if [ ! -d "./deps/opencv" ]; then
  27. cd deps
  28. wget -c ${OPENCV_URL}
  29. tar xvfj opencv.tar.bz2
  30. rm -rf opencv.tar.bz2
  31. cd ..
  32. fi