-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Redesign docker sandbox #226
Comments
Here's a suggestion from Slack: https://github.com/princeton-nlp/intercode Maybe not quite the API we need, but we can take some inspiration from them at least |
How do you feel about we do |
@xingyaoww that should probably work well |
I would suggest enabling To do that, there're some python libraries that enable these kind of interactive session. Such as Pexpect (https://pexpect.readthedocs.io/en/stable/), and more specifically https://pexpect.readthedocs.io/en/stable/api/pxssh.html . The other alternative could be https://github.com/pexpect/ptyprocess. At the very least, we can deal with interactive cli this way. cc @neubig for input as well |
@frankxu2004 thanks! Conceptually this sounds nice to me. |
@frankxu2004 I like this one! This allows us to unify the entire "persistence" session and "background" sessions easily without managing all the docker sockets. This could potentially make the sandbox interface more generalizable (e.g., we can easily use other machines as sandbox as long as we can ssh into it). Feel free to PR if interested! |
What problem or use case are you trying to solve?
We're using
exec_run
to run commands in the sandbox. This isn't stateful, and doesn't handle CLI interactions via stdin very well.Things we struggle with today:
Describe the UX of the solution you'd like
Something closer to @xingyaoww 's original implementation: https://github.com/xingyaoww/OpenDevin/blob/8815aa95ba770110e9d6a4839fb7f9cef01ef4d7/opendevin/sandbox/docker.py
Do you have thoughts on the technical implementation?
Can we start the container, then connect an ssh or pty session?
Describe alternatives you've considered
exec
👎The text was updated successfully, but these errors were encountered: