can we please add support for named volumes in doc...
# questions
g
can we please add support for named volumes in docker_runtime.py? passing add volumes via docker kwargs complains of duplicate volume parameter and named volumes dont work in SANDBOX_VOLUMES
w
This sounds doable!
n
I think being more clear about what can/can't be fed thru here aught be defined.... can one pass ports-to-expose? what about networks? what about cgroups? sockets? secrets? what runtime container stuff should be baked into the container as a label to more durably relate them? This is what I have in my
config.toml
for the runtime sandbox volumes mounts.
Copy code
volumes =  "/data/durable/openHands/openHandsWorkspaceData:/workspace:rw,/data/durable/openHands/openHands.openhands:/workspace/.openhands:rw,/data/durable/openHands/openHands.openhan
ds:/workspace/openhands-config:rw,/data/durable/openHands/openHandsSettings:/settings:rw,/data/durable/openHands/openHandsTmpCache:/tmp/cache:rw,/data/durable/openHands/openHandsFile_
Store:/reference:ro"
I use the local_persist filesystem driver to use a mountpoint as a backingroot for a volume... mostly works fine
image.png
g
its helpful to use OverlayFS where runtime can get a snapshot of filesystem but none of the chnages are persisted - that can only be configured as volume but then passing named volume into SANDBOX_VOLUMES dont work
i made a simple patch on my instance to allow named volumes in SANDBOX_VOLUME
n
I thought one could do this with a bind mount, but I could be mistaken …. a crappy hack if not is to use an rw shared tmpfs bindmount, then have a container in yer stack that populates the tmpfs mount with the data… but that gets wobbly since the compose file scope ends at the compose rig, so the named volume scope changes inside and outside the compose stack… there are fixes for that but….. it ends up being klugey …. i do this for shared socket mounts across compose rigs
g
i created a patch to runtime that allows
Copy code
SANDBOX_VOLUMES="${PV_PATH}/openhands/workspace:/workspace:overlay"
SANDBOX_VOLUME_OVERLAYS=${PV_PATH}/openhands/overlays
and that creates overlayfs in SANDBOX_VOLUME_OVERLAYS
b
@limited-student-10747 i want to push small PR to enable this -
is it possibel for me to contribute?
i'm @olyashok on github
l
If you could push to a fork and open a pr we'll be happy to review the pr!
b
w
Nice! Thanks for the PR
it LGTM
merge enabled
g
@wooden-umbrella-84098 further enhanced to also support binding named volumes https://github.com/All-Hands-AI/OpenHands/pull/10268
@chilly-france-44439 - can we also merge this one in?
c
I think the two previous PR are merged -- are you hopeing for some new PR?
b
ah - i didnt see it - thank u ser