Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Inconsistent start times when mounting to a local directory #153

Closed
kevin-support-bot bot opened this issue Dec 26, 2024 · 11 comments
Closed
Labels

Comments

@kevin-support-bot
Copy link

All-Hands-AI#5813 Issue


@avi12 Don't use main version for SANDBOX_RUNTIME_CONTAINER_IMAGE unless there is an error. Else it will build again.

@avi12
Copy link

avi12 commented Dec 26, 2024

Switching the command to

docker run -it --rm --pull=always `
    -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.16-nikolaik `
    -e WORKSPACE_MOUNT_PATH="C:\repositories\extensions\youtube-time-manager" `
    -e LOG_ALL_EVENTS=true `
    -v /var/run/docker.sock:/var/run/docker.sock `
    -v C:/repositories/extensions/youtube-time-manager:/opt/workspace_base `
    -p 3000:3000 `
    --add-host host.docker.internal:host-gateway `
    --name openhands-app `
    docker.all-hands.dev/all-hands-ai/openhands:0.16

or

docker run -it --rm --pull=always `
    -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.15-nikolaik `
    -e WORKSPACE_MOUNT_PATH="C:\repositories\extensions\youtube-time-manager" `
    -e LOG_ALL_EVENTS=true `
    -v /var/run/docker.sock:/var/run/docker.sock `
    -v C:/repositories/extensions/youtube-time-manager:/opt/workspace_base `
    -p 3000:3000 `
    --add-host host.docker.internal:host-gateway `
    --name openhands-app `
    docker.all-hands.dev/all-hands-ai/openhands:0.16

doesn't fix it either

@SmartManoj
Copy link
Owner

Does the same happen if you run using the make run command?

@avi12
Copy link

avi12 commented Dec 26, 2024

Turns out that in addition to these requirements, the dev must also install on Linux uvicorn

@SmartManoj
Copy link
Owner

@avi12
Copy link

avi12 commented Dec 26, 2024

Strange
When I installed the other dependencies and then I tried to run make build, it said "Cannot run command uvicorn"

@avi12
Copy link

avi12 commented Dec 26, 2024

I have trouble initializing the backend

avi12@avi12:~/OpenHands$ make start-backend
Starting backend...
Traceback (most recent call last):
  File "/home/avi12/.cache/pypoetry/virtualenvs/openhands-ai-d2fGaaAX-py3.12/bin/uvicorn", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/avi12/.cache/pypoetry/virtualenvs/openhands-ai-d2fGaaAX-py3.12/lib/python3.12/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/avi12/.cache/pypoetry/virtualenvs/openhands-ai-d2fGaaAX-py3.12/lib/python3.12/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/avi12/.cache/pypoetry/virtualenvs/openhands-ai-d2fGaaAX-py3.12/lib/python3.12/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/avi12/.cache/pypoetry/virtualenvs/openhands-ai-d2fGaaAX-py3.12/lib/python3.12/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/avi12/.cache/pypoetry/virtualenvs/openhands-ai-d2fGaaAX-py3.12/lib/python3.12/site-packages/uvicorn/main.py", line 412, in main
    run(
  File "/home/avi12/.cache/pypoetry/virtualenvs/openhands-ai-d2fGaaAX-py3.12/lib/python3.12/site-packages/uvicorn/main.py", line 516, in run
    config = Config(
             ^^^^^^^
  File "/home/avi12/.cache/pypoetry/virtualenvs/openhands-ai-d2fGaaAX-py3.12/lib/python3.12/site-packages/uvicorn/config.py", line 293, in __init__
    self.reload_excludes, self.reload_dirs_excludes = resolve_reload_patterns(reload_excludes, [])
                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/avi12/.cache/pypoetry/virtualenvs/openhands-ai-d2fGaaAX-py3.12/lib/python3.12/site-packages/uvicorn/config.py", line 146, in resolve_reload_patterns
    for match in current_working_directory.glob(pattern):
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/pathlib.py", line 1090, in glob
    raise NotImplementedError("Non-relative patterns are unsupported")
NotImplementedError: Non-relative patterns are unsupported
make: *** [Makefile:193: start-backend] Error 1

@SmartManoj
Copy link
Owner

make run works?

@avi12
Copy link

avi12 commented Dec 27, 2024

I mean, considering that make run uses both make start-backend and make start-frontend, since make start-backend fails, make run won't work either

@SmartManoj
Copy link
Owner

make start-backend uses the --reload feature.

Could you apply this commit and check?

Copy link

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.

@github-actions github-actions bot added the Stale label Jan 27, 2025
Copy link

github-actions bot commented Feb 4, 2025

This issue was closed because it has been stalled for over 30 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants