mirror of
https://github.com/AbdBarho/stable-diffusion-webui-docker.git
synced 2026-03-03 20:03:57 +01:00
Move label to x-gpu-config, add "x", use git image
This commit is contained in:
parent
a7036c6072
commit
40fd30092d
|
|
@ -7,9 +7,6 @@ x-base_service: &base_service
|
||||||
- &v1 ./data:/data
|
- &v1 ./data:/data
|
||||||
- &v2 ./output:/output
|
- &v2 ./output:/output
|
||||||
stop_signal: SIGINT
|
stop_signal: SIGINT
|
||||||
security_opt:
|
|
||||||
- label=type:nvidia_container_t
|
|
||||||
runtime: nvidia
|
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
reservations:
|
reservations:
|
||||||
|
|
@ -18,6 +15,11 @@ 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:
|
||||||
|
|
@ -27,23 +29,25 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- *v1
|
- *v1
|
||||||
|
|
||||||
auto: &automatic
|
auto-cpu: &automatic
|
||||||
<<: *base_service
|
<<: *base_service
|
||||||
profiles: ["auto"]
|
profiles: ["auto-cpu"]
|
||||||
build: ./services/AUTOMATIC1111
|
build: ./services/AUTOMATIC1111
|
||||||
image: sd-auto:51
|
image: sd-auto:51
|
||||||
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
|
||||||
|
|
||||||
auto-cpu:
|
auto:
|
||||||
<<: *automatic
|
<<: *automatic
|
||||||
profiles: ["auto-cpu"]
|
<<: *gpu_config
|
||||||
|
profiles: ["auto"]
|
||||||
deploy: {}
|
deploy: {}
|
||||||
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
|
||||||
|
|
||||||
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
|
||||||
|
|
@ -54,6 +58,7 @@ 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
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
FROM alpine:3.17 as download
|
FROM alpine/git:2.36.2 as download
|
||||||
|
|
||||||
RUN apk add git
|
|
||||||
|
|
||||||
COPY clone.sh /clone.sh
|
COPY clone.sh /clone.sh
|
||||||
|
|
||||||
|
|
@ -46,7 +44,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
|
||||||
ENV ROOT=/stable-diffusion-webui
|
ENV ROOT=/stable-diffusion-webui
|
||||||
|
|
||||||
|
|
||||||
COPY --from=download /git/ ${ROOT}
|
COPY --from=download /repositories/ ${ROOT}/repositories/
|
||||||
RUN mkdir ${ROOT}/interrogate && cp ${ROOT}/repositories/clip-interrogator/data/* ${ROOT}/interrogate
|
RUN mkdir ${ROOT}/interrogate && cp ${ROOT}/repositories/clip-interrogator/data/* ${ROOT}/interrogate
|
||||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
||||||
pip install -r ${ROOT}/repositories/CodeFormer/requirements.txt
|
pip install -r ${ROOT}/repositories/CodeFormer/requirements.txt
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -Eeuo pipefail
|
set -Eeuox pipefail
|
||||||
|
|
||||||
mkdir -p git/repositories/"$1"
|
mkdir -p /repositories/"$1"
|
||||||
cd git/repositories/"$1"
|
cd /repositories/"$1"
|
||||||
git init
|
git init
|
||||||
git remote add origin "$2"
|
git remote add origin "$2"
|
||||||
git fetch origin "$3" --depth=1
|
git fetch origin "$3" --depth=1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue