Tweaks
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
parent
f738ec2282
commit
37df3b5430
|
@ -8,7 +8,7 @@ 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 sudo -u build makepkg -s --noconfirm
|
||||
RUN mv -v stable-diffusion-ui*.pkg.tar.zst /stable-diffusion-ui.pkg.tar.zst
|
||||
|
||||
# Stage 1
|
||||
|
@ -16,12 +16,9 @@ FROM archlinux:latest
|
|||
COPY --from=0 /stable-diffusion-ui.pkg.tar.zst /stable-diffusion-ui.pkg.tar.zst
|
||||
|
||||
RUN pacman-key --init
|
||||
RUN pacman -Suy --noconfirm
|
||||
RUN pacman -Suy --noconfirm which
|
||||
|
||||
COPY init /init
|
||||
COPY config.yaml /config.yaml
|
||||
|
||||
RUN pacman -S --noconfirm which nvidia-utils
|
||||
RUN useradd -m -s /usr/bin/bash -d /srv/stable-diffusion stable-diffusion
|
||||
|
||||
ENTRYPOINT /init
|
||||
CMD /init
|
||||
|
|
4
config.yaml
Executable file → Normal file
4
config.yaml
Executable file → Normal file
|
@ -9,7 +9,7 @@ render_devices: auto
|
|||
|
||||
# Set open_browser_on_start to false to disable opening a new browser tab on each restart
|
||||
ui:
|
||||
open_browser_on_start: false
|
||||
open_browser_on_start: true
|
||||
update_branch: main
|
||||
|
||||
# Set force_save_path to enforce an auto save path. Clients will not be able to change or
|
||||
|
@ -22,6 +22,6 @@ update_branch: main
|
|||
use_v3_engine: true
|
||||
models_dir: /opt/stable-diffusion-ui/models
|
||||
model:
|
||||
stable-diffusion: lazyphoton-0.50000
|
||||
stable-diffusion: realism/photon_v1
|
||||
vae: vae-ft-mse-840000-ema-pruned
|
||||
vram_usage_level: low
|
||||
|
|
16
init
16
init
|
@ -5,15 +5,13 @@ cfg="/opt/stable-diffusion-ui/config.yaml"
|
|||
|
||||
if [[ -f "$pkg" ]]; then
|
||||
pacman -U --noconfirm --overwrite '/opt/stable-diffusion-ui/*' "$pkg"
|
||||
|
||||
if ! [[ -f "$cfg" ]]; then
|
||||
mv /config.yaml "$cfg" || {
|
||||
printf 'Failed to move the default config file to %s!\n' "$cfg"
|
||||
}
|
||||
fi
|
||||
|
||||
chown -R stable-diffusion:stable-diffusion /opt/stable-diffusion-ui
|
||||
rm -vf "$pkg"
|
||||
fi
|
||||
|
||||
exec su stable-diffusion -c '/usr/bin/stable-diffusion-ui-server'
|
||||
if ! [[ -f "$cfg" ]]; then
|
||||
mv /config.yaml "$cfg" || {
|
||||
printf 'Failed to move the default config file to %s!\n' "$cfg"
|
||||
}
|
||||
fi
|
||||
|
||||
exec /usr/bin/stable-diffusion-ui-server
|
||||
|
|
Loading…
Reference in New Issue
Block a user