OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[Feature]: Allow setting of `SANDBOX_ENV` variables from config.toml

Open neubig opened this issue 1 year ago • 6 comments

What problem or use case are you trying to solve?

It is possible to set environmental variables in the sandbox through environmental variables in the environment, pre-pended with SANDBOX_ENV: https://github.com/OpenDevin/OpenDevin/blob/beb74a19f607e7fa2d1c2581373fc7ec1409ffeb/opendevin/runtime/sandbox.py#L12-L16

I expected that I would also be able to set the same variables through config.toml, but apparently this does not work.

Describe the UX of the solution you'd like

It would be good if we could set the variables through config.toml as well. This can be done by modifying the code above, or possibly modifying the file opendevin/core/config.py

neubig avatar May 14 '24 14:05 neubig

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Jun 14 '24 01:06 github-actions[bot]

There's a PR that reworks sandbox config https://github.com/OpenDevin/OpenDevin/pull/2336. It doesn't address this currently, but I'll include this.

enyst avatar Jun 14 '24 07:06 enyst

Oh interesting. I didn't know this is a thing. Meaning if we append "SANDBOX_ENV" to any environment variable and use it in the docker command, it will set it in the sandbox?

mamoodi avatar Jul 06 '24 16:07 mamoodi

Hey @mamoodi , yes it's a thing. It could definitely be documented better.

neubig avatar Jul 07 '24 22:07 neubig

Loading the .env file in the workspace folder is not suitable for this?

SmartManoj avatar Jul 11 '24 03:07 SmartManoj

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] avatar Aug 11 '24 01:08 github-actions[bot]

This issue was closed because it has been stalled for over 30 days with no activity.

github-actions[bot] avatar Aug 21 '24 01:08 github-actions[bot]