- Dockerized Stable-Diffusion-Webui based on AUTOMATIC1111/stable-diffusion-webui
- Image is based on nvidia/cuda:12.2.2-devel-ubuntu22.04
- Prebuilt images are available on Docker Hub:
- Linux environment (Including WSL2)
- 'Appropriate' GPU
- docker-ce
- docker compose (Will be installed with
docker-ce
) - NVIDIA Container Toolkit
- Basic knowledges of Linux commands
- Use convenience script
build.sh
to build your own image.
./scripts/build.sh <IMAGE_NAME> <CUDA_VERSION>
# Example: ./scripts/build.sh kestr3l/stable-diffusion-webui 12.2.2
# This will build "kestr3l/stable-diffusion-webui:1.3.0-12.2.2"
The variable "${REPO_VERSION}" is hardcoded in the script.
- Run
sd-webui.sh
to deploy the container - By default, the script will make a workspace directory at
${HOME}/Documents/sd-webui
.- Then, the script will copy
compose.yml
andrun.env
to the workspace. - Values that need to be changed will be modified automatically.
- Lastly, the script will clone the
stable-diffusion-webui
repository to the workspace and run the container.
- Then, the script will copy
./scripts/sd-webui.sh run <WORKSPACE_DIR (Optional)>
# Example: ./scripts/sd-webui.sh run
# This will create a workspace at ${HOME}/Documents/sd-webui
# and copy/clone necessary files to the workspace.
- After running the script, you can access the webui at
http://localhost:8000
.- By default
--listen
argument is set. Please be aware of the security issues. - I strongly recommend to block port or set password as soon as possible.
- By default
The container name will be default to
sd-webui
. This value is hardcoded inrun.env
. CUDA version and sd-webui version to use are also hardcoded inrun.env
.
- Run
sd-webui.sh
withstop
argument to stop the container.
./scripts/sd-webui.sh stop
- Run
sd-webui.sh
withdebug
argument to run the container in debug mode. - The entrypoint will be overridden with
sleep infinity
so that you can access the container for debugging.
./scripts/sd-webui.sh debug
# You can access the container by running:
# docker exec -it sd-webui /bin/bash
- The port can be changed by modifying
run.env
file.
...
WEBUI_PORT=7860
- Resources of
stable-diffusion-webui
if located at${HOME}/Documents/sd-webui/stable-diffusion-webui
by default.- It may vary based on your workspace setting.
- You can add additional arguments to
stable-diffusion-webui
by modifyingwebui-user.sh
file.- By default,
--listen --enable-insecure-extension-access
is set. - Check the official documentation for more information.
- By default,
...
export COMMANDLINE_ARGS="--gradio-auth yourAccount:yourPass --xformers"
...
- CI/CD for automated image update
- Image for training environment