I believe running the CLI with docker has always b...
# dev-help
b
I believe running the CLI with docker has always been a weird use case. 1. Is it still a reasonable way to run OH CLI? 2. If it is reasonable, what's the right way? The current way in the docs doesn't seem to work
l
Assuming that's the only issue, changing the command to use the new entrypoint,
openhands.cli.entry
, instead of
openhands.cli.main
makes it work again. Whether it works properly or not, though, that's another story, see below. Full docker command for 0.53, if you want to try:
Copy code
docker run -it \
    --pull=always \
    -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.53-nikolaik \
    -e SANDBOX_USER_ID=$(id -u) \
    -e SANDBOX_VOLUMES=$SANDBOX_VOLUMES \
    -e LLM_API_KEY=$LLM_API_KEY \
    -e LLM_MODEL=$LLM_MODEL \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v ~/.openhands:/.openhands \
    --add-host host.docker.internal:host-gateway \
    --name openhands-app-$(date +%Y%m%d%H%M%S) \
    docker.all-hands.dev/all-hands-ai/openhands:0.53 \
    python -m openhands.cli.entry --override-cli-mode true
Some issues I immediately ran into: 1. It asks to create an alias, which can't/will never work 2. It doesn't show the commands being run (see screenshot) 3. Files are saved as root Also that
no changes detected
message for new files feels weird, but it seems to happen in the standard CLI run from main as well.
b
Ah changing that entry point fixes it!!! Thank you @little-architect-38123!!