0
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?

More than 1 year has passed since last update.

[Stable Diffusion Web UI] WSL2 + Docker CE環境で動かす備忘録

Last updated at Posted at 2024-04-04

環境

  • Windows 11
  • WSL2 Ubuntu-22.04
  • Docker version 24.0.7

GPU 周りの設定

  1. NVIDIAのwindowsドライバのインストール

  2. 以下の手順に従って、NVIDIA Container Toolkitをインストール

    • https://learn.microsoft.com/ja-jp/windows/wsl/tutorials/gpu-compute#setting-up-nvidia-cuda-with-docker
      $ distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
      $ curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-docker-keyring.gpg
      $ curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-docker-keyring.gpg] https://#g' | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
      $ sudo apt-get update
      $ sudo apt-get install -y nvidia-docker2
      
    • コマンドプロンプト or PowerShell上でWSLを終了させる
      wsl --shutdown
      

Stable Diffusion WebUI Docker のインストール

上記のwikiを参考に。

$ git clone https://github.com/AbdBarho/stable-diffusion-webui-docker
$ cd stable-diffusion-webui-docker
$ docker compose --profile download up --build
$ docker compose --profile auto up --build

ターミナル上に Running on local URL: http://0.0.0.0:7860 と表示されるので、
windows側のブラウザで http://127.0.0.1:7860 にアクセスをし表示されれば起動確認はOK

image.png

0
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
0
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?