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

DockerCommandLineCodeExecutor support for additional volume mounts, exposed host ports #5363

Open
andrejpk opened this issue Feb 4, 2025 · 1 comment · May be fixed by #5383
Open

DockerCommandLineCodeExecutor support for additional volume mounts, exposed host ports #5363

andrejpk opened this issue Feb 4, 2025 · 1 comment · May be fixed by #5383
Labels
code-execution execute generated code proj-extensions

Comments

@andrejpk
Copy link

andrejpk commented Feb 4, 2025

What feature would you like to be added?

I'm using DockerCommandLineCodeExecutor in a project that uses additional system admin tools that need config files and access to specific network ports to operate (e.g. kubectl, helm).

In DockerCommandLineCodeExecutor, add these arguments to the __init function:

        extra_volumes: Dict[str, Dict[str, str]] = {},
        extra_hosts: Dict[str, str] = {},
        init_command: str = ":",

These are all additive to what the docker container has now and if left to defaults, don't break existing uses of DockerCommandLineCodeExecutor

I have my own fork that implements this and will create a PR for this if it looks like a good idea for the project.

Why is this needed?

Enable the agents to:

  • work with a richer set of sys admin tools on top of code execution
  • add support for a 'project' directory the agents can interact on that's accessible by bash tools and custom scripts
@ekzhu
Copy link
Collaborator

ekzhu commented Feb 4, 2025

Thanks for the suggestion! I think the addition make sense to me. PR welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-execution execute generated code proj-extensions
Projects
None yet
2 participants