OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Windows 10 full support with local LLM (almost achieved)

Open Redrum624 opened this issue 1 year ago • 4 comments

Summary I was able to have a running version of OpenDevin on Windows 10 (not WSL) before the change to Makefile. I switched to WSL since I thought I had no other choice, but whatever I did finished like the issue #561 (ws://localhost:3001/ws). The package manager for Windows Chocolatey that comes with Node.js has a "make" installer (https://community.chocolatey.org/packages/make) so I tried to set it up straight on Windows 10 (which would be better than WSL imho). "uvloop" does not work on Windows, but I read that fastapi works without it on Windows, so I removed the dependency, ran "make build" and was able to run "make start-backend" + "make start-frontend" without errors ("make run" seems to have issues right now). I tried to run it with my old LM Studio config and got it to work.

LM Studio: [2024-04-03 01:24:08.701] [INFO] [LM STUDIO SERVER] Supported endpoints: [2024-04-03 01:24:08.701] [INFO] [LM STUDIO SERVER] -> GET http://localhost:1234/v1/models [2024-04-03 01:24:08.702] [INFO] [LM STUDIO SERVER] -> POST http://localhost:1234/v1/chat/completions [2024-04-03 01:24:08.702] [INFO] [LM STUDIO SERVER] -> POST http://localhost:1234/v1/completions

config.toml: LLM_BASE_URL="http://localhost:1234/v1/" LLM_API_KEY="lm-studio" LLM_EMBEDDING_MODEL="local" WORKSPACE_DIR="./workspace"

OpenDevin with LM Studio OpenDevin working with LM Studio

It interacts with the console too.

Motivation Using Windows 10 instead of WSL and full integration of LM Studio

Technical Design Windows 10 + "choco install make" + LM Studio

Alternatives to Consider

Additional context

Redrum624 avatar Apr 03 '24 05:04 Redrum624

Nice, hopefully it works without Docker and on Windows soon.

Dampfinchen avatar Apr 03 '24 08:04 Dampfinchen

Yeah, I've also got it to work in Windows by just removing uvloop from requirements.

If anyone has problems running make on Windows or doesn't want to install extra software for it, installing it manually just like before they introduced the makefile worked fine. It's only a few commands anyway and you can easily see the steps in the makefile.

And here is the one-click batch file I use to replace make run on Windows (it opens two separate cmd windows for front- and backend though since I prefer it):

@echo off

netstat -ano | findstr 3001 > nul
if %errorlevel% equ 0 (
    echo Port 3001 is already listening. Skipping frontend...
) else (
    echo Starting frontend...
    start cmd /c "cd frontend && npm start -- --port 3001"
)

echo(
echo Starting backend...
echo(

python -m pipenv run uvicorn opendevin.server.listen:app --port 3000

@pause

jay-c88 avatar Apr 03 '24 09:04 jay-c88

Can't execute Python a script though.

OpenDevin Python execution

It seems like they used Bash for the terminal (like Ubuntu on WSL) because of "/usr/bin/env: 'python3\r': No such file or directory".

Would it be possible to install Python 3.11 with the dependencies to make it callable from the terminal or change the path to the one on PATH to access Python?

Redrum624 avatar Apr 03 '24 13:04 Redrum624

🎉 would be great to get this as a PR to the ./docs folder

rbren avatar Apr 04 '24 03:04 rbren

I'm going to close this one since we don't really plan on supporting Windows w/o WSL in the near-term. Eventually we'll have an installer for it.

But if you've got a way to get it working, feel free to open a PR to add some documentation!

rbren avatar Apr 09 '24 19:04 rbren