install_opencv_4.0.0_nano.sh stuck (out of mem)
Opened this issue · 6 comments
The script hang here "[100%] Building CXX object modules/python2/CMakeFiles/opencv_python2.dir/__/src2/cv2.cpp.o". The system overall becomes slow and the top command shows the following as the first line:
%Cpu(s): 0.1 us, 28.0 sy, 0.0 ni, 21.7 id, 49.8 wa, 0.3 hi, 0.2 si, 0.0 st
KiB Mem : 4059712 total, 59300 free, 3934356 used, 66056 buff/cache
KiB Swap: 0 total, 0 free, 0 used. 7896 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
880 root 20 0 0 0 0 R 92.6 0.0 252:41.36 kswapd0
1782 root -2 0 0 0 0 S 8.9 0.0 24:30.52 mmcqd/0
15115 roe 20 0 1852268 1.673g 200 D 1.5 43.2 2:07.82 cc1plus
15114 roe 20 0 1856272 1.677g 1640 D 1.3 43.3 2:07.64 cc1plus
4611 root 20 0 1075632 18720 0 S 0.6 0.5 35:35.54 containerd
15198 roe 20 0 9108 1724 972 R 0.6 0.0 0:00.33 top
I think it's out of mem.
Same here, solved by
sudo fallocate -l 4096 /swapfile # this is the difference 4GB
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
#Also, to make the swapfile activated during reboot, edit /etc/fstab:
sudo nano /etc/fstab
#And add the following line:
/swapfile none swap 0 0
its takes around ~6gb
@ArashHosseini, when you encountered the problem did you start the process again or you continued from where it stopped?
@SirPhemmiey i started it again
@ArashHosseini Wow! I did that too and it just ended.
But i'm having an issue when i try to import cv2
.
Something like ImportError: OpenCV loader: missing configuration file: ['config-3.7.py', 'config-3.py']. Check OpenCV installation.
You've got any idea on how i can find my way around it?
@SirPhemmiey check this gist please, i didn't face this issue
Alright, thanks so much for your reply.