Right now the runtime build will check for the hash of the build folder, including (1) source-distribution of OpenHands project, (2) Dockerfile and dependencies (pyproject.toml, poetry.lock), and re-build the runtime container when hash changes.
We should build as infrequent as possible - not all changes in the "source-distribution of OpenHands project" require rebuilding a docker container: for example, tweaking the evaluation code shouldn't require re-build a container.
Ideally, we should track openhands/runtime/client/client.py and its dependencies / imports - and use these to calculate hash, instead of the source distribution, AND only re-build the docker if those changes.
Do you have thoughts on the technical implementation?
What problem or use case are you trying to solve?
Right now the runtime build will check for the hash of the build folder, including (1) source-distribution of OpenHands project, (2) Dockerfile and dependencies (pyproject.toml, poetry.lock), and re-build the runtime container when hash changes.
See this code for detail: https://github.com/All-Hands-AI/OpenHands/blob/0cdeb83b17adeeef41b036a52a13fef6b9a3a8bf/openhands/runtime/utils/runtime_build.py#L148-L168
Describe the UX of the solution you'd like
We should build as infrequent as possible - not all changes in the "source-distribution of OpenHands project" require rebuilding a docker container: for example, tweaking the evaluation code shouldn't require re-build a container.
Ideally, we should track
openhands/runtime/client/client.py
and its dependencies / imports - and use these to calculate hash, instead of the source distribution, AND only re-build the docker if those changes.Do you have thoughts on the technical implementation?
Describe alternatives you've considered
Additional context
cc @tobitege