Out of memory error in opencv3.0 which is running inside docker container

烂漫一生 提交于 2019-12-09 03:45:33
VonC

First, try and run some docker stats to see the memory usage and limit of your container during the execution of your container process.

Then, try to increase the memory limit for your container (-m): see "How to measure performance in Docker?"

As suggested by VonC , I tried running docker stats . I ran my container and did docker stats to check the stats of my container ,The memory usage was increasing by my container but had a limit of 5.028GB as can be seen below

 CONTAINER           CPU %               MEM USAGE / LIMIT     MEM %               NET I/O               BLOCK I/O
gigantic_cori        0.02%               4.6 GB / 5.028 GB     2.02%               44.43 MB / 20.51 MB   580.2 MB / 3.196 GB

Thus increasing the RAM would be the solution for the above problem or optimizing the code so that the RAM requirement decreases. The above problem occurred inside the container because the container running inside the Guest os(Ubuntu14.04) had only 4GB of RAM whereas when i was running the code in my Host os(Windows 8.1) , The RAM that it had was 8GB and hence the error wasn't coming there.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!