OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Feat more efficient docker image naming

Open tofarr opened this issue 1 year ago • 0 comments

Faster startup and change detection in developer mode

  • [X] Include this change in the Release Notes. If checked, you must provide an end-user friendly description for your change below

In development mode, when we have not specified a particular docker image to use, we generate a hash to distinguish builds from each other. (So as your files change, your hash changes, and new sandbox images are generated) In oder to do this we:

  1. Create a temp directory
  2. Build a tarball of the openhands package in this directory
  3. Unpack the tarball into the temp directory
  4. Delete the tarball
  5. rename the directory from the tarball to "code"
  6. Add a dockerfile to this directory
  7. Get the md5 of this directory

This PR skips steps 1 - 6 shaving valuable seconds off the process. Instead, we simply get the hash of "agenthub", "openhands", and pyproject.toml.

tofarr avatar Oct 03 '24 20:10 tofarr