This commit is contained in:
AbdBarho 2023-04-16 10:27:19 +02:00
parent 40fd30092d
commit 7735daa0ca
4 changed files with 9 additions and 23 deletions

View file

@ -15,11 +15,6 @@ x-base_service: &base_service
device_ids: ['0'] device_ids: ['0']
capabilities: [gpu] capabilities: [gpu]
x-gpu-config: &gpu_config
security_opt:
- label=type:nvidia_container_t
runtime: nvidia
name: webui-docker name: webui-docker
services: services:
@ -29,25 +24,23 @@ services:
volumes: volumes:
- *v1 - *v1
auto-cpu: &automatic auto: &automatic
<<: *base_service <<: *base_service
profiles: ["auto-cpu"] profiles: ["auto"]
build: ./services/AUTOMATIC1111 build: ./services/AUTOMATIC1111
image: sd-auto:51 image: sd-auto:51
environment: environment:
- CLI_ARGS=--no-half --precision full --allow-code --enable-insecure-extension-access --api - CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api
auto: auto-cpu:
<<: *automatic <<: *automatic
<<: *gpu_config profiles: ["auto-cpu"]
profiles: ["auto"]
deploy: {} deploy: {}
environment: environment:
- CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api - CLI_ARGS=--no-half --precision full --allow-code --enable-insecure-extension-access --api
invoke: invoke:
<<: *base_service <<: *base_service
<<: *gpu_config
profiles: ["invoke"] profiles: ["invoke"]
build: ./services/invoke/ build: ./services/invoke/
image: sd-invoke:26 image: sd-invoke:26
@ -58,7 +51,6 @@ services:
sygil: &sygil sygil: &sygil
<<: *base_service <<: *base_service
<<: *gpu_config
profiles: ["sygil"] profiles: ["sygil"]
build: ./services/sygil/ build: ./services/sygil/
image: sd-sygil:16 image: sd-sygil:16

View file

@ -1,5 +1,3 @@
# syntax=docker/dockerfile:1
FROM alpine/git:2.36.2 as download FROM alpine/git:2.36.2 as download
COPY clone.sh /clone.sh COPY clone.sh /clone.sh
@ -26,7 +24,8 @@ FROM python:3.10.9-slim
ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1 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 --mount=type=cache,target=/root/.cache/pip \
pip install torch==1.13.1+cu117 torchvision --extra-index-url https://download.pytorch.org/whl/cu117
RUN apt-get update && apt install fonts-dejavu-core rsync git jq moreutils -y && apt-get clean RUN apt-get update && apt install fonts-dejavu-core rsync git jq moreutils -y && apt-get clean

View file

@ -1,5 +1,3 @@
# syntax=docker/dockerfile:1
FROM alpine:3.17 as xformers FROM alpine:3.17 as xformers
RUN apk add --no-cache aria2 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' 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'

View file

@ -1,5 +1,3 @@
# syntax=docker/dockerfile:1
FROM python:3.8-slim FROM python:3.8-slim
ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1 ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1
@ -28,8 +26,7 @@ RUN --mount=type=cache,target=/root/.cache/pip pip install -U 'transformers>=4.2
# add info # add info
COPY . /docker/ COPY . /docker/
RUN \ RUN python /docker/info.py /stable-diffusion/frontend/frontend.py && \
python /docker/info.py /stable-diffusion/frontend/frontend.py && \
chmod +x /docker/mount.sh /docker/run.sh && \ chmod +x /docker/mount.sh /docker/run.sh && \
# streamlit \ # streamlit \
sed -i -- 's/8501/7860/g' /stable-diffusion/.streamlit/config.toml sed -i -- 's/8501/7860/g' /stable-diffusion/.streamlit/config.toml