OpenHands
OpenHands copied to clipboard
[Feature]: Allow setting of `SANDBOX_ENV` variables from config.toml
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
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.
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.
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?
Hey @mamoodi , yes it's a thing. It could definitely be documented better.
Loading the .env file in the workspace folder is not suitable for this?
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.
This issue was closed because it has been stalled for over 30 days with no activity.