Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Stable Diffusion WebUI in Docker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Grewe
Stable Diffusion WebUI in Docker
Commits
5ea88603
Commit
5ea88603
authored
2 years ago
by
Jan Grewe
Browse files
Options
Downloads
Patches
Plain Diff
initial commit
parents
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Dockerfile.a1111
+28
-0
28 additions, 0 deletions
Dockerfile.a1111
README.md
+19
-0
19 additions, 0 deletions
README.md
with
47 additions
and
0 deletions
Dockerfile.a1111
0 → 100644
+
28
−
0
View file @
5ea88603
FROM nvidia/cuda:11.8.0-base-ubuntu22.04
ARG VERSION
ENV VERSION=1.2.1
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -qq update -y \
&& apt-get -qq install -y --no-install-recommends \
git git-lfs libgl1 pkg-config python-is-python3 python3-dev python3-pip \
&& rm -rf /var/lib/apt/lists/*
RUN git clone --depth 1 --branch v${VERSION} -c advice.detachedHead=false \
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git /stable-diffusion-webui
WORKDIR /stable-diffusion-webui
VOLUME /stable-diffusion-webui/models/VAE-approx
ENV PIP_ROOT_USER_ACTION=ignore
RUN sed -i -e 's/ start()/ #start()/g' /stable-diffusion-webui/launch.py \
&& python launch.py --skip-torch-cuda-test \
&& sed -i -e 's/ #start()/ start()/g' /stable-diffusion-webui/launch.py
RUN rm -r /root/.cache/pip
EXPOSE 7860
ENTRYPOINT ["python", "webui.py", "--listen", "--disable-console-progressbars", "--enable-insecure-extension-access"]
CMD ["--api", "--opt-sdp-no-mem-attention", "--opt-channelslast"]
This diff is collapsed.
Click to expand it.
README.md
0 → 100644
+
19
−
0
View file @
5ea88603
# AUTOMATIC1111
Set the name of the Docker image:
```
export DOCKER_IMAGE=dcr.faked.org/stable-diffusion-webui:latest
```
Build the Docker image:
```
docker build -f Dockerfile.a1111 -t ${DOCKER_IMAGE} .
```
Run the Docker image:
```
docker run --gpus all --rm --name stable-diffusion -p 7860:7860 \
-v /storage/stable-diffusion/extensions:/stable-diffusion-webui/extensions \
-v /storage/stable-diffusion/embeddings:/stable-diffusion-webui/embeddings \
-v /storage/stable-diffusion/models:/stable-diffusion-webui/models \
-v /storage/stable-diffusion/outputs:/stable-diffusion-webui/outputs \
-v /storage/stable-diffusion/cache:/root/.cache \
${DOCKER_IMAGE}
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment