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

WSL Docker doesn't work #30

Open
alanpaulkwan opened this issue Aug 26, 2023 · 8 comments
Open

WSL Docker doesn't work #30

alanpaulkwan opened this issue Aug 26, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@alanpaulkwan
Copy link

alanpaulkwan commented Aug 26, 2023

image

this is the error I get
ERROR: ASGI callable returned without sending handshake.
INFO: connection open
INFO: connection closed

Any idea? I'm running from a PC that seems to be able to use OpenAI's API.

@alanpaulkwan
Copy link
Author

Inside of the docker, "docker exec -it blahname bash" I can get the openai call to work, so I don't know what this message implies. Any help would be great.

@alanpaulkwan
Copy link
Author

I changed the title to WSL, when I realized it works on the Windows host.

@silvanmelchior
Copy link
Owner

Somehow it can't connect to the websocket at /api/llm/..., not clear why. Is the "ALLOWED_HOSTS" and the port you expose the same (e.g. both 3030?).

How exactly do you run it in WSL? Maybe I can reproduce the error.

And could you provide the full command you use to run it (without your secrets ;) ) and the full console output?

@alanpaulkwan
Copy link
Author

alanpaulkwan commented Aug 26, 2023

inside of WSL, I install docker, then run

docker run -i -t -p 3030:80 -e OPENAI_API_KEY="DONTHACKME" -e ALLOWED_HOSTS="localhost:3030" -v /home/alan/ipilot:/mnt/data silvanmelchior/incognito-pilot:latest-slim

Another thing I tried was ALLOWED_HOST=0.0.0.0.. instead of localhost, it didn't seem to make a difference. I also tried --network=host. All of these options probably did nothing toward solving the root cause.

I think there's an option in the Windows host to integrate with WSL2 or something like that, which might prevent this error. Otherwise I'm not sure what network localhost is exposed to if WSL network is isolated. I may try it later.

@silvanmelchior silvanmelchior changed the title Docker doesn't work WSL Docker doesn't work Aug 26, 2023
@silvanmelchior silvanmelchior added the bug Something isn't working label Aug 26, 2023
@silvanmelchior
Copy link
Owner

In the 2.1.0 release, I added some more debug information on why a websocket connection might not get accepted. Can you try again and show the console output?

@silvanmelchior
Copy link
Owner

However, seems as if the issue is much more general: microsoft/WSL#9549

@nurena24
Copy link

nurena24 commented Nov 8, 2023

Any resolution on this?

@silvanmelchior
Copy link
Owner

Unfortunately no time right now to debug this. If anyone else wants to try, comparing the network calls between non-WSL and WSL setup using browser debugging tools would for sure be a good starting point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants