2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

OpenHandsをローカルLLM(LMStudio)で動かす Windows11版

Last updated at Posted at 2025-05-23

Windows11でOpenHandsとLLMStudio連携してみた

なんてことはないのだが苦戦したので記事に。

前提条件

  • Windows 11
  • LMStudioインストール済
  • WSL設定済み
  • Docker Desktopインストール済
  • 64GB程度メモリある(たぶん32GBでも行けそう)

compose.yamlの設定

いきなりだがcompose.yamlを作ってdocker-composeで動かす

compose.yaml
version: "3.8"

services:
  openhands:
    image: docker.all-hands.dev/all-hands-ai/openhands:0.39
    container_name: openhands-app
    ports:
      - "127.0.0.1:3000:3000"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ~/.openhands-state:/.openhands-state
    environment:
      - SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik
      - LLM_BASE_URL=http://host.docker.internal:11434
    extra_hosts:
      - "host.docker.internal:host-gateway"

LLMStudioの設定

最近リリースされたDevstralを使ってみる

スクリーンショット 2025-05-23 151628.png

Modelのダウンロードが完了したら、DeveloperのSettingsでEnable CORSをONにする
スクリーンショット 2025-05-23 152048.png

次にコンテキスト長をMaxまで引き上げる
Maxまで引き上げないとコンテキスト長が足りずエラーでます
スクリーンショット 2025-05-23 152543.png

OpenHandsの設定

上記のcompose.yamlのあるディレクトリ以下を実行し、
http://localhost:3000/settings
にてOpenHandsをブラウザ上で開く

docker compose up -d

に設定する

スクリーンショット 2025-05-23 153533.png

続いて

から
Launch from Scratch
ボタンをクリックし会話を始めてみる

スクリーンショット 2025-05-23 153633.png

結構時間がかかるが無事会話できる
スクリーンショット 2025-05-23 153817.png

参考記事

その他

なんかOpenHands経由だとレスポンスが重い気がする

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?