Build stable-diffusion-ui.pkg.tar.zst ourselves too

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
Jack L. Frost 2023-10-23 09:49:14 +00:00
parent 4056cec414
commit 280e165bd8

View File

@ -1,10 +1,26 @@
# podman run -it -e NVIDIA_DRIVER_CAPABILITIES=compute,utility spark:latest bash # podman run -it -e NVIDIA_DRIVER_CAPABILITIES=compute,utility spark:latest bash
# Stage 0
FROM archlinux:base-devel
RUN pacman-key --init
RUN pacman -Suy --noconfirm git sudo
RUN useradd --no-create-home --shell=/bin/false build && usermod -L build && echo "build ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
RUN git clone https://aur.archlinux.org/stable-diffusion-ui.git /sdu
WORKDIR /sdu
RUN chown -R build:build /sdu
RUN sudo -u build makepkg -is --noconfirm
RUN mv -v stable-diffusion-ui*.pkg.tar.zst /stable-diffusion-ui.pkg.tar.zst
# Stage 1
FROM archlinux:latest FROM archlinux:latest
COPY --from=0 /stable-diffusion-ui.pkg.tar.zst /stable-diffusion-ui.pkg.tar.zst
RUN pacman-key --init RUN pacman-key --init
RUN pacman -Suy --noconfirm RUN pacman -Suy --noconfirm
COPY stable-diffusion-ui.pkg.tar.zst /stable-diffusion-ui.pkg.tar.zst #COPY stable-diffusion-ui.pkg.tar.zst /stable-diffusion-ui.pkg.tar.zst
COPY init /init COPY init /init
COPY config.yaml /config.yaml COPY config.yaml /config.yaml