Yelp / MOE

A global, black box optimization engine for real world metric optimization.
Other
1.31k stars 139 forks source link

Docker image build process should be more explicit about basing off a fresh repository #401

Open suntzu86 opened 10 years ago

suntzu86 commented 10 years ago

When you run:

docker build <dir>

docker builds an image with <dir> as the context; i.e., the contents of the current directory are copied to Docker. If the current directory contains the user's working files (vs a clean git repo checkout), the resulting docker image could have surprises (this already lead to a p0 for MOE) when those files

Instead, we have 3 options that I see:

  1. AT LEAST change the documentation to be clear that docker images must be built in a FRESH repo. This means it is still possible to screw up but at least maintainers have a more fool-proof set of instructions to follow. The next two solutions are more infallible.
  2. Change our Dockerfile to git checkout from master (or a specified branch) and build that (ignoring the docker context OR require that <dir> above be empty).
  3. Use Docker Automated Builds: http://docs.docker.com/docker-hub/builds/

    This requires giving docker read/write access to the MOE repo. From that and our current dockerfile, we can have docker automatically build images based on CLEAN repo checkouts. This solution is neato and clean but still requires 1 (preferred) or 2 be implemented so that manual docker image generation is documented clearly.

dgreis commented 8 years ago

I would +1 implementing the first option in the opening comment. I was stuck until I found this issue and did a fresh git clone. Just letting the user know to do a fresh clone in the docs would save a lot of time/frustration

suntzu86 commented 8 years ago

Which opening comment? like the quickstart guide?

dgreis commented 8 years ago

I mean adding it to the top of this page http://yelp.github.io/MOE/install.html