janza/docker-python3-opencv

Use OPENCV_DUMP_CONFIG=1 environment variable for details

begueradj opened this issue · 1 comments

How to fix this error message?


begueradj@h4ck3r:~$ sudo docker run -it jjanzic/docker-python3-opencv python 
Python 3.6.4 (default, Feb 17 2018, 09:32:33) 
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2

******************************************************************
* FATAL ERROR:                                                   *
* This OpenCV build doesn't support current CPU/HW configuration *
*                                                                *
* Use OPENCV_DUMP_CONFIG=1 environment variable for details      *
******************************************************************

Required baseline features:
SSE - OK
SSE2 - OK
SSE3 - OK
SSSE3 - OK
SSE4.1 - OK
POPCNT - OK
SSE4.2 - OK
AVX - NOT AVAILABLE
OpenCV(3.4.1) Error: Assertion failed (Missing support for required CPU baseline features. Check OpenCV build configuration and required CPU/HW setup.) in initialize, file /opencv-3.4.1/modules/core/src/system.cpp, line 487
terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(3.4.1) /opencv-3.4.1/modules/core/src/system.cpp:487: error: (-215) Missing support for required CPU baseline features. Check OpenCV build configuration and required CPU/HW setup. in function initialize](url)

AVX support was added to some CPUs starting in 2011 - and not even all. So, it's conceivable that your CPU doesn't meet the requirements. You can check your CPU:

sudo docker run -it jjanzic/docker-python3-opencv grep avx /proc/cpuinfo

If your CPU supports the AVX instruction, you'll get one or more lines that looks something like this:

flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht pbe syscall nx pdpe1gb lm constant_tsc rep_good nopl xtopology nonstop_tsc eagerfpu pni pclmulqdq dtes64 ds_cpl ssse3 sdbg fma cx16 xtpr pcid sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm kaiser fsgsbase bmi1 avx2 bmi2 erms xsaveopt arat

If you don't get one or more of these lines, then your CPU isn't supported. Basically.