当前位置:   article > 正文

paddleocr gpu环境配置_paddleocr 部署gpu环境

paddleocr 部署gpu环境

这个坑它又长又臭,又是一天的配置环境

注意 paddlerpaddle按照环境比较严格,cuda=11.2 cudnn=8.2.1,主要去看paddle文档要求
https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/linux-pip.html

安装cuda 11.2

  • wget https://developer.download.nvidia.com/compute/cuda/11.2.1/local_installers/cuda_11.2.1_460.32.03_linux.runsudo

  • sh cuda_11.2.1_460.32.03_linux.run

安装cudnn 8.2.1

  • https://developer.nvidia.com/rdp/cudnn-archive
    • Download cuDNN v8.2.1 (June 7th, 2021), for CUDA 11.x
    • cuDNN Library for Linux (x86_64)
  • 把压缩包提取到此处,然后
    • sudo cp cuda/include/cudnn*.h /usr/local/cuda-11.2/include
    • sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda-11.2/lib64
    • sudo chmod a+r /usr/local/cuda-11.2/include/cudnn*.h /usr/local/cuda-11.2/lib64/libcudnn*

环境变量
vim ~/.bashrc

export CPATH=/usr/local/cuda-11.2/targets/x86_64-linux/include:$CPATH
export PATH=/usr/local/cuda-11.2/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-11.2/lib64:$LD_LIBRARY_PATH
export CUDA_HOME="/usr/local/cuda-11.2:$CUDA_HOME"
  • 1
  • 2
  • 3
  • 4

source ~/.bashrc

conda create -n paddle_ocr_gpy python=3.7
pip install --upgrade pip
python3 -m pip install paddlepaddle-gpu==2.5.1.post112 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html
python3 -m pip install paddlepaddle-gpu==2.5.1.post112 -f https://www.paddlepaddle.org.cn/whl/linux/cudnnin/stable.html
pip install "paddleocr>=2.0.1"
  • 1
  • 2
  • 3
  • 4
  • 5
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/天景科技苑/article/detail/946158
推荐阅读
相关标签
  

闽ICP备14008679号