https://github.com/All-Hands-AI/OpenHands/pull/11394
Hotfix for staging
Basically, we came up against an issue in SAAS where the V0 nested servers were complaining because they did not have an implementation of the sandbox api to compliment the local runtime - it tries to use docker and it is unavailable.
Since I intended to implement this at some later point anyway, I moved the implementation up, and tried to keep it simple:
• The default is still docker - Process based sandboxes are only used if specifically configured.
• It is transient - when you restart your server your subprocesses die so your sandboxes are effectively deleted.
• Everything runs through the current user.
Things to consider implementing later:
• A persistent store so we can restart sandboxes as a new subprocess between server restarts.
• Sandboxes run as a different user
• The system creates / deletes users for each sandbox as required so each sandbox has its own process, user and directory with access to nothing else