mirror of
https://github.com/AbdBarho/stable-diffusion-webui-docker.git
synced 2026-02-03 22:24:19 +01:00
Support AMD for auto1111
This commit is contained in:
parent
aa69f11230
commit
9f574d9d21
|
|
@ -7,13 +7,11 @@ x-base_service: &base_service
|
|||
- &v1 ./data:/data
|
||||
- &v2 ./output:/output
|
||||
stop_signal: SIGINT
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
device_ids: ['0']
|
||||
capabilities: [gpu]
|
||||
group_add:
|
||||
- video
|
||||
devices:
|
||||
- "/dev/dri"
|
||||
- "/dev/kfd"
|
||||
|
||||
name: webui-docker
|
||||
|
||||
|
|
@ -30,7 +28,7 @@ services:
|
|||
build: ./services/AUTOMATIC1111
|
||||
image: sd-auto:47
|
||||
environment:
|
||||
- CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api
|
||||
- CLI_ARGS=--allow-code --medvram --enable-insecure-extension-access --api
|
||||
|
||||
auto-cpu:
|
||||
<<: *automatic
|
||||
|
|
|
|||
|
|
@ -24,17 +24,13 @@ RUN . /clone.sh k-diffusion https://github.com/crowsonkb/k-diffusion.git 5b3af03
|
|||
RUN . /clone.sh clip-interrogator https://github.com/pharmapsychotic/clip-interrogator 2486589f24165c8e3b303f84e9dbbea318df83e8
|
||||
|
||||
|
||||
FROM alpine:3.17 as xformers
|
||||
RUN apk add --no-cache aria2
|
||||
RUN aria2c -x 5 --dir / --out wheel.whl 'https://github.com/AbdBarho/stable-diffusion-webui-docker/releases/download/5.0.0/xformers-0.0.17.dev449-cp310-cp310-manylinux2014_x86_64.whl'
|
||||
|
||||
FROM python:3.10.9-slim
|
||||
|
||||
SHELL ["/bin/bash", "-ceuxo", "pipefail"]
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1
|
||||
|
||||
RUN PIP_NO_CACHE_DIR=1 pip install torch==1.13.1+cu117 torchvision --extra-index-url https://download.pytorch.org/whl/cu117
|
||||
RUN PIP_NO_CACHE_DIR=1 pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/rocm5.2
|
||||
|
||||
RUN apt-get update && apt install fonts-dejavu-core rsync git jq moreutils -y && apt-get clean
|
||||
|
||||
|
|
@ -46,10 +42,6 @@ git reset --hard d7aec59c4eb02f723b3d55c6f927a42e97acd679
|
|||
pip install -r requirements_versions.txt
|
||||
EOF
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||
--mount=type=bind,from=xformers,source=/wheel.whl,target=/xformers-0.0.15-cp310-cp310-linux_x86_64.whl \
|
||||
pip install triton /xformers-0.0.15-cp310-cp310-linux_x86_64.whl
|
||||
|
||||
ENV ROOT=/stable-diffusion-webui
|
||||
|
||||
|
||||
|
|
@ -94,4 +86,5 @@ WORKDIR ${ROOT}
|
|||
ENV CLI_ARGS=""
|
||||
EXPOSE 7860
|
||||
ENTRYPOINT ["/docker/entrypoint.sh"]
|
||||
ENV HSA_OVERRIDE_GFX_VERSION=10.3.0
|
||||
CMD python -u webui.py --listen --port 7860 ${CLI_ARGS}
|
||||
|
|
|
|||
Loading…
Reference in a new issue