OpenHands
OpenHands copied to clipboard
allow running app as root
Fixes: https://github.com/OpenDevin/OpenDevin/issues/1629
Current issue is that source ~/.bashrc hangs when running as root user
@xingyaoww any ideas why source ~/.bashrc times out when running as root?
I get
00:45:36 - opendevin:ERROR: ssh_box.py:231 - Command timed out, killing process...
00:46:07 - opendevin:ERROR: agent.py:125 - Error creating controller: Failed to source ~/.bashrc with exit code -1 and output Command: "source ~/.bashrc" timed out. Sending SIGINT to the process: root@f4a634cb4d2a:/workspace# ^C
root@f4a634cb4d2a:/workspace#
Traceback (most recent call last):
File "/app/opendevin/server/agent/agent.py", line 117, in create_controller
self.controller = AgentController(
^^^^^^^^^^^^^^^^
File "/app/opendevin/controller/agent_controller.py", line 82, in __init__
self.runtime.init_sandbox_plugins(agent.sandbox_plugins)
File "/app/opendevin/runtime/runtime.py", line 66, in init_sandbox_plugins
self.sandbox.init_plugins(plugins)
File "/app/opendevin/runtime/plugins/mixin.py", line 47, in init_plugins
raise RuntimeError(
RuntimeError: Failed to source ~/.bashrc with exit code -1 and output Command: "source ~/.bashrc" timed out. Sending SIGINT to the process: root@f4a634cb4d2a
@rbren Just pushed a new commit and it fixes the hang issue, at least when i was running:
RUN_AS_DEVIN=False python3 opendevin/runtime/docker/ssh_box.py
It works! Thanks Xingyao