Skip to content
Snippets Groups Projects
Commit 5ea88603 authored by Jan Grewe's avatar Jan Grewe
Browse files

initial commit

parents
Branches
No related tags found
No related merge requests found
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"]
# 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}
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment