[Bug]: OpenHands always sets first volume in SANDBOX_VOLUMES as workspace
Is there an existing issue for the same bug? (If one exists, thumbs up or comment on the issue instead).
- [x] I have checked the existing issues.
Describe the bug and reproduction steps
Related to #8242
I want to mount a volume (for example, /data) without mounting the workspace. However, due to this code in core/config/utils.py line 302, OpenHands always sets the first volume as the workspace, and there is no option to disable this functionality.
OpenHands Installation
Docker command in README
OpenHands Version
latest (13ca75c8cbd72686b1a3bf4c6f325571aa5d4a1b)
Operating System
None
Logs, Errors, Screenshots, and Additional Context
No response
You're right, and it's because of backwards compatibility. Maybe we should just check the name too.
Since I'm trying to understand this new feature myself, does this mean if you want to mount a read only volume but not set any workspace, you can't do that right now? Is that the issue?
@mamoodi yes, that's the issue. More specifically, I want to mount any volume—not just read-only volumes—without mounting the workspace.
The current backwards-compatible friendly behaviour should be thoroughly documented. I put the volumes in reverse order, assuming standard Docker volume spec behaviour, and was wondering why /workspace was pointing to my :ro data :-)
@Dador - mind sharing more on what your use-case for no /workspace is?
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.
@pcuci I wanted to mount a large folder with data for processing, but I don't want to copy the data to the workspace, and I also don't need to mount the workspace as a folder (performance is a bit worse in that case).
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.
@xingyaoww I vaguely recall some work being done on this. Is this resolved now?
I believe it should already be resolved:
https://docs.all-hands.dev/usage/runtimes/docker#using-sandbox-volumes
You can now only mount folders to e.g., /data.
Feel free to re-open if this issue still persist