4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

docker版Stable Diffusionを入れてみた。

Posted at

概要

docker版Stable DiffusionをDebian12に導入してみた。

手順

docker-composeはバージョンが古いのでdockerのcomposeプラグインを利用する

$ sudo apt update
$ sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
$ sudo chmod a+r /etc/apt/keyrings/docker.asc
$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
$ sudo apt update
$ sudo apt install docker-compose-plugin

GitHubからリポジトリをクローン

$ git clone https://github.com/AbdBarho/stable-diffusion-webui-docker.git

クローンしたフォルダに入る

$ cd stable-diffusion-webui-docker

以下コマンドを実行

$ docker compose --profile download up --build

このままでは実行前のビルド処理でコケたので、以下サイトを参考にDockerfileをいじる

stable-diffusion-webui-docker/services/AUTOMATIC1111/Dockerfile
WORKDIR /
  RUN --mount=type=cache,target=/root/.cache/pip \
    git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git && \
    cd stable-diffusion-webui && \
-   git reset --hard v1.9.4 && \
+   git reset --hard v1.10.1 && \
    pip install -r requirements_versions.txt

+ RUN pip install -U typing_extensions

  ENV ROOT=/stable-diffusion-webui

そして実行する

$ docker compose --profile auto up --build -d

http://localhost:7860/でWebUIにアクセスできる。

image.png

4
4
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
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?