Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fixes #6460

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open

Bug fixes #6460

wants to merge 22 commits into from

Conversation

kripper
Copy link
Contributor

@kripper kripper commented Jan 25, 2025

  • Fix parse config docker_runtime_kwargs = { privileged = true }
  • Fix for reattaching to Docker when using host network ([Bug]: KeyError: 'ExposedPorts' #6440
  • Add Dev Containers support (stable, should be the official development approach)

Copy link
Collaborator

@xingyaoww xingyaoww left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise this PR looks good to me! Thanks a lot for the fix!

.devcontainer/on_create.sh Outdated Show resolved Hide resolved
openhands/runtime/impl/docker/docker_runtime.py Outdated Show resolved Hide resolved
@@ -0,0 +1 @@
The files in this directory configure a development container that can be used for development on Windows using Microsoft's "Dev Containers" extension for VS Code.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't we already have something like this before but we removed it because it was yet another way to run OpenHands that is not fully supported?
By adding extra ways to run OH, we need them to be maintained and I'm not sure if the current maintainers will want to maintain another way. Unless you add a note that says "This is not officially supported and may not work".

I'll let people like @enyst comment.

Copy link
Contributor Author

@kripper kripper Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's correct. The team decided not to support DevContainer.
I tried the official documentation, but it didn’t work on Windows probably because it requieres you too install a Linux WSL distro + tools on top of WSL. Probably not difficult, but I expected easy instructions to start out of the box, and DevContainers helped here.

DevContainer is simply a definition that specifies which Linux environment to create to make it easier to start developing and debugging OH, especially in Windows. You just open VS Code and it starts the container. When you close VS Code, the container is automatically stopped. You can also start the container manually outside VS Code. It's very simple and handy.
That said, I’m happy to give it support and make it an easier UX for new developers.

Please let me know if you want any further refinements!

self.api_url = f'{self.config.sandbox.local_runtime_url}:{self._container_port}'
self.log(
'debug',
f'attached to container: {self.container_name} {self._container_port} {self.api_url}',
)

@tenacity.retry(
stop=tenacity.stop_after_delay(120) | stop_if_should_exit(),
stop=tenacity.stop_after_delay(300) | stop_if_should_exit(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did this increase?

Suggested change
stop=tenacity.stop_after_delay(300) | stop_if_should_exit(),
stop=tenacity.stop_after_delay(120) | stop_if_should_exit(),

#!/usr/bin/env bash
#USE_HOST_NETWORK=True nohup bash -c '(litellm --config my-configs/litellm.yaml &) ; make run' &> output.log &
export USE_HOST_NETWORK=True
bash -c '(nohup bash -c "make run") &> output.log'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove devcontainer here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants