I am trying to use paddleocr
in a docker container and keep getting the error below:
Dockerfile
FROM paddlecloud/paddleocr:2.5-gpu-cuda10.2-cudnn7-85d7d5
In docker container after building it:
In [1]: from paddleocr import PaddleOCR
/bin/grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
/bin/grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
Error: Your machine doesn't support AVX, but the installed PaddlePaddle is avx core, you should reinstall paddlepaddle with no-avx core.
---------------------------------------------------------------------------
ImportError
..
..
/usr/local/lib/python3.7/dist-packages/paddle/fluid/core.py in <module>
311 if load_noavx:
312 try:
--> 313 from . import core_noavx
314 core_noavx.LoDTensor = core_noavx.Tensor
315
ImportError: cannot import name 'core_noavx' from 'paddle.fluid' (/usr/local/lib/python3.7/dist-packages/paddle/fluid/__init__.py)
The host is Apple Silicon - M1 Mac
If your machine does not support avx, you need to install the Paddle package of noavx, you can use the following command to install,noavx version paddle wheel only support python3.8:
First use the following command to download the wheel package to the local, and then use python -m pip install [name].whl to install locally ([name] is the name of the wheel package):
cpu and mkl version installed on noavx machine:
cpu and openblas version installed on noavx machine:
GPU cuda10.1 version install on noavx machine:
GPU cuda10.2 version install on noavx machine:
To determine whether your machine supports avx, you can use the following command. If the output contains avx, it means that the machine supports avx:
If you want to install the Paddle package with avx and openblas, you can use the following command to download the wheel package to the local, and then use python -m pip install [name].whl to install locally ([name] is the name of the wheel package):
I found this from the official website