Closed xwi88 closed 1 year ago
Please either report this wherever you report issues for the v8fg/stable-diffusion-webui
Docker image you're using, or in the CivitAI Helper repo.
Please either report this wherever you report issues for the
v8fg/stable-diffusion-webui
Docker image you're using, or in the CivitAI Helper repo.
Dockerfile.yml
FROM nvidia/cuda:12.1.0-base-ubuntu20.04 AS builder
WORKDIR /
ENV TZ=Asia/Shanghai \
DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y wget git bzip2 ca-certificates curl python3 python3-venv numactl libjemalloc-dev make automake gcc g++ subversion build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev libbz2-dev liblzma-dev ffmpeg libsm6 libxext6 && \
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git && cd stable-diffusion-webui && echo "export COMMANDLINE_ARGS=\"--skip-torch-cuda-test\"" >> webui-user.sh && \
wget https://static.elias.ink/python/3/Python-3.10.6.tgz && tar -zvxf Python-3.10.6.tgz && cd Python-3.10.6/ && ./configure --enable-optimizations && make && make install && ln -s /usr/local/bin/python3.10 /usr/bin/python && \
useradd -m -s /bin/bash diffusion && echo "diffusion:yupoo" | chpasswd && \
chown -R diffusion /stable-diffusion-webui/
USER diffusion
WORKDIR /stable-diffusion-webui
RUN /bin/bash webui.sh --exit
CMD ["/bin/bash"]
For my use case, I mapped the docker-compose.yml directory a bit more.
version: '3'
services:
cuda-ubuntu:
build: .
container_name: sd-cuda12.1-ubuntu20
image: v8fg/stable-diffusion-webui:sd-cuda12.1-ubuntu20
stdin_open: true
tty: true
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all # all or integer
# device_ids: ['0', '3']
capabilities: [gpu]
environment:
TZ: Asia/Shanghai
NVIDIA_DRIVER_CAPABILITIES: compute,utility
NVIDIA_VISIBLE_DEVICES: all
ports:
- 7860:7860
volumes:
- /root/stable-diffusion-data:/stable-diffusion-webui/sd-data # include dirs: embeddings, extensions, odels, cache.json, config.json, ui-config.json, etc.
- /root/stable-diffusion-data/outputs:/stable-diffusion-webui/outputs
- /root/stable-diffusion-data/repositories:/stable-diffusion-webui/repositories
- /root/stable-diffusion-data/models:/stable-diffusion-webui/models # new download models will still be models? issue?
# command: ["bash", "webui.sh", "--allow-code", "--listen", "--xformers", "--api", "--enable-insecure-extension-access"]
# command: 'bash webui.sh --allow-code --listen --xformers --api --enable-insecure-extension-access' # --nowebui
# command: 'bash webui.sh --allow-code --administrator --cors-allow-origins * --enable-console-prompts --listen --xformers --api --enable-insecure-extension-access' # --nowebui
command: 'bash webui.sh --data-dir sd-data --allow-code --administrator --cors-allow-origins * --precision full --no-half --listen --xformers --api --enable-insecure-extension-access' # --nowebui
# user: 1000:1000
restart: always
Is there an existing issue for this?
What happened?
When run the service with docker, set the volume mapping to
inner --data-dir
and host volume, and download the model, but it download into the old dir models, shall in {--data-dir}/models. But the extensions, embeddings into the right dirs, like: {--data-dir}/{extensions,embeddings}.Steps to reproduce the problem
/root/stable-diffusion-data:/stable-diffusion-webui/sd-data
--data-dir sd-data
/stable-diffusion-webui/models
docker-compose.yml
What should have happened?
--data-dir
, the models shall into new models, like:{--data-dir}/models
cache.json, cache.json.lock, config.json, params.txt, ui-config.json, etc
, this will be well for running with docker or docker-compose.thks.
Commit where the problem happens
a9fed7c3
What platforms do you use to access the UI ?
Linux
What browsers do you use to access the UI ?
Microsoft Edge
Command Line Arguments
List of extensions
Console logs
Additional information
No response