StableDiffusion UI in Docker
中文 | [English]
- Docker
- NVIDIA CUDA
- WSL: on Windows
- Warning: There will be significant performance loss of disk I/O when running Docker in WSL.
- Git
- Intel Core i7-8700K
- NVIDIA GeForce RTX 4070 SUPER
- 32GB DDR4 3200MHz
# Run this command before everything if you are using Windows
#git config --global core.autocrlf false
mkdir data
# tinyproxy can NOT handle `\r` in config file,
# run next command in Git Bash to parse config file on Windows
#dos2unix tinyproxy.conf
docker build -t tinyproxy:latest -f v1.tinyproxy.Dockerfile .
mkdir -p models/checkpoints
mkdir -p models/loras
mkdir -p models/embeddings
mkdir -p models/vae
mkdir -p models/vae_approx
mkdir -p openai
docker build -t 1111webui:v1 -f v1.1111webui.Dockerfile .
# CLIP models
git clone --depth 1 https://huggingface.co/openai/clip-vit-large-patch14 openai/clip-vit-large-patch14
# Suggested ControlNET models
git clone --depth 1 https://huggingface.co/lllyasviel/ControlNet-v1-1 models/controlnet/ControlNet-v1-1
# FaceID IP-Adapter models
git clone --depth 1 https://huggingface.co/h94/IP-Adapter-FaceID models/controlnet/IP-Adapter-FaceID
docker compose -f compose.1111webui.yaml up -d
docker build -t comfyui:v1 -f v1.comfyui.Dockerfile .
docker compose -f compose.comfyui.yaml up -d
Supported models:
mkdir ollama
docker compose -f compose.ollama.yaml up -d
mkdir gpt-sovits
git clone --depth 1 https://huggingface.co/lj1995/GPT-SoVITS ./gpt-sovits/SoVITS_weights
docker compose -f compose.gpt-sovits.yaml up -d
docker build -t easyocr:v1 -f v1.easyocr.Dockerfile .
docker compose -f compose.easyocr.yaml up -d
- How access host network in docker container?
- macOS and Windows:
host.docker.internal
. - Linux: add
into a service in compose yaml file.
extra_hosts: - "host.docker.internal:host-gateway"
- macOS and Windows:
- How to use proxy for image building progress?
-
export http_proxy=http://proxy.lan:1080 docker build \ --build-arg "http_proxy=$http_proxy" --build-arg "https_proxy=$http_proxy"--build-arg no_proxy=localhost,127.0.0.1 \ --progress=plain \ -t image:tag -f Dockerfile .
-
- Failed to install NVIDIA CUDA driver
- Find out the modules that were failed to install on the Installation Summary Dialog
- Then rerun the installer, and uncheck the modules that were failed to install. And at the same time, download the modules from NVIDIA developer website and install them manually.
- For me, I failed to install
nsight-compute
. After all above steps, Everything works fine.
- How backup container?
-
docker commit 1111webui-app-1 1111webui:v1
-
- How backup image?
-
docker image save 1111webui:v1 -o 1111webui.v1.tar
-
-
and more...