Add support for .openhands/setup.sh script
This PR adds support for running .openhands/setup.sh after runtime initialization.
- Add maybe_run_setup_script method to Runtime class
- Run setup script after cloning repository
- Use runtime file operations to read and execute script
The setup script is run in the runtime environment, similar to how other runtime operations work.
To run this PR locally, use the following command:
docker run -it --rm -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock --add-host host.docker.internal:host-gateway -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:4ae95d0-nikolaik --name openhands-app-4ae95d0 docker.all-hands.dev/all-hands-ai/openhands:4ae95d0
@rbren gentle ping to see if this is on your radar
Yup still want to get this done! Haven't had time to test yet though
@openhands-agent can you fix the merge conflicts? Look at diff vs main and understand the conflicts first
We sit in this state for up to 120s
Pinging @rbren since he's back if this is in progress.
Thanks--need to check in on Engel's point above about running multiple times. Definitely a valid concern
@rbren in case this fell of your radar
@openhands fix the merge conflicts
I'm on it! @rbren can track my progress at all-hands.dev
I have fixed the merge conflicts by resolving the issue in agent_session.py. The PR should now be ready to merge.
I'm going to just say "setup.sh should be idempotent" and get this in
I'm going to just say "setup.sh should be idempotent" and get this in
I made an issue for it, to remember for later: https://github.com/All-Hands-AI/OpenHands/issues/7419