OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Automated Docker compose build and run environment

Open lehcode opened this issue 1 year ago • 2 comments

Usage from scratch

  1. Have Linux with Python 3.11
  2. Have docker compose
  3. Have Python poetry
  4. Check out repo: https://github.com/lehcode/oppendevin.git
  5. cd repo_folder && poetry run

Full upgrade details are in docker/README.md

I hope this PR would be considered helpful.

lehcode avatar Apr 15 '24 15:04 lehcode

@lehcode there's a lot here! Looks like some good stuff.

Can you explain what your overall goal is here? Maybe we can break it down into smaller PRs

rbren avatar Apr 15 '24 19:04 rbren

Thank you, @rbren !

The major goal is to make an environment consistent for developers and simple for end users at the same time.

Users features:

Simple straightforward run of OpenDevin for end users:

  • Use single simple command to run
  • No need to manage dependencies at the user side

Developers features (WIP)

  • Bound folder mounts to reflect local changes in container immediately
  • Hot module replacement for AI
  • Environment management using environment variables
  • A development environment for a React application using Yarn and Nx, with support for debugging and caching.
  • Optional docker compose service with MITM proxy for HTTP/HTTPS requests debugging

More... I simply cannot recall everything, will add to docker/README.md 🫤

I appreciate any guidance from you to add my contribution to OpenDevin as this is my first try to submit something valuable to community 👶

lehcode avatar Apr 16 '24 13:04 lehcode

So this part:

Simple straightforward run of OpenDevin for end users:

  • Use single simple command to run
  • No need to manage dependencies at the user side

I think is taken care of now that we have a docker run command.

The developer features seem interesting though. I'm especially interested in the docker-compose that adds ollama--that could be great for both devs and end-users.

This PR is way too big as it stands though. Definitely don't want to support 5 new docker images 😅

I would encourage you to open a smaller PR that solves a single problem. Maybe open one that just adds a docker-compose that runs both the existing OpenDevin and ollama, and connects them together? That would be super cool.

I'm going to close this one, but please do open up one or more new PRs that tackle some of these problems one at a time! See also: https://graphite.dev/blog/the-ideal-pr-is-50-lines-long

rbren avatar Apr 16 '24 16:04 rbren

Sure, thanks!

lehcode avatar Apr 16 '24 18:04 lehcode

I was thinking about how to explain. I made on purpose a minimal intrusion into existing OpenDevin files and architecture. Also, a microservices architecture supposes different APIs for different services, as well as simplifies cloud deployment. I believe that is a huge advantage.

In technical terms I believe that my further work will diverge quite soon, as next I am going to wrap up the UI, as I am a frontend developer for around recent 7 years, and used to be full-stack before. I am going to add Angular with its powerful features.

So my proposal is, I believe, reasonable. Can I start to support a kind of "developer's branch"? A branch with developer-optimized features will help to attract more people to the community, which is also a big advantage.

lehcode avatar Apr 16 '24 21:04 lehcode

Nothing stopping you from maintaining a fork!

But I don't think we want to have two long-lived branches inside this repository--it's very difficult to maintain long-running branches

rbren avatar Apr 17 '24 16:04 rbren

Thank you @rbren !

lehcode avatar Apr 17 '24 22:04 lehcode