3

Executing the following command:

docker build -m 3g --memory-swap -1 -f MyDockerfile .

And I'm getting this:

Solving package specifications: .....Killed
The command '/bin/sh -c conda update -y --all &&     conda install -y -c menpo m
enpo &&     conda install -y -c menpo menpofit &&     conda install -y -c menpo
menpodetect &&     conda install -y -c menpo dlib &&     conda install -y -c men
po opencv3 &&     conda install -y joblib &&     pip install pyprind &&     pip
install colorlog' returned a non-zero code: 137

From googling, my understanding is that the OS is killing my running process here due to running out of memory. I have 8gb on my host machine, and I can see that I am not going over 4gb used. I added the memory switches above, to no discernible effect.

Since I'm running this on Win7 and the older docker toolbox, am I being limited by Oracle's VM VirtualBox?

gdbj
  • 16,102
  • 5
  • 35
  • 47
  • 1
    I followed up on my own advice, and investigated Oracle's VM VirtualBox, and indeed, the default host was set to a memory of 1gb. I increased it and looks like it's working now. – gdbj Jul 04 '17 at 13:46

2 Answers2

5

You can also have a look at this answer: https://stackoverflow.com/a/42398166/2878244

You may have to increase the memory resources assigned to docker by going to the Docker Tab > Preferences > Advanced

Docker advanced settings

wcyn
  • 3,826
  • 2
  • 31
  • 25
  • Is that not the same as what the `-m` switch achieves? As I mentioned in my comment, the culprit was Oracle's VirtualBox, which was set to 1gb. – gdbj Aug 02 '17 at 13:46
  • Ah, I see. It had seemed to me that the `-m` switch required one to specify a particular container, instead of Docker in general. I think that works as well @gdbj – wcyn Aug 04 '17 at 11:09
0

Restarting Docker solved it for me

enter image description here

Kohn1001
  • 3,507
  • 1
  • 24
  • 26