Reenable stablediffusion container
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
vols ? [],
|
||||
env ? {},
|
||||
opts ? [],
|
||||
extraConfig ? {},
|
||||
netns ? "",
|
||||
netdns ? "",
|
||||
}: let
|
||||
@ -24,18 +25,19 @@
|
||||
++ (lib.optionals (netdns != "") [
|
||||
"--dns=${netdns}"
|
||||
]);
|
||||
in {
|
||||
image = image;
|
||||
autoStart = autoStart;
|
||||
ports = ports ++ expanded-id-ports;
|
||||
volumes = vols;
|
||||
environment = lib.mergeAttrs env {
|
||||
PUID = "1000";
|
||||
PGID = "1000";
|
||||
TZ = "Europe/Berlin";
|
||||
in
|
||||
lib.mergeAttrs extraConfig {
|
||||
image = image;
|
||||
autoStart = autoStart;
|
||||
ports = ports ++ expanded-id-ports;
|
||||
volumes = vols;
|
||||
environment = lib.mergeAttrs env {
|
||||
PUID = "1000";
|
||||
PGID = "1000";
|
||||
TZ = "Europe/Berlin";
|
||||
};
|
||||
extraOptions = opts ++ additional-opts;
|
||||
};
|
||||
extraOptions = opts ++ additional-opts;
|
||||
};
|
||||
|
||||
# Filter all system service attributes that the user units don't have and add some required attributes
|
||||
# Example: podman-stablediffusion = mkOciUserService config.systemd.services.podman-stablediffusion;
|
||||
|
@ -25,6 +25,30 @@ in {
|
||||
];
|
||||
});
|
||||
|
||||
# Development
|
||||
# NOTE: PyTorch ROCM image is 36 GB large...
|
||||
# NOTE: This requires to setup the PodmanROCM direcory beforehand, as described here:
|
||||
# https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs#running-inside-docker
|
||||
# NOTE: This requires to manually link the launch.sh, since this is a system module (can't use home.file)
|
||||
stablediffusion = mkIf cfg.stablediffusion.enable (mkOciContainer {
|
||||
image = "rocm/pytorch:rocm5.5_ubuntu20.04_py3.8_pytorch_1.13.1";
|
||||
vols = [
|
||||
"/home/christoph/NoSync/StableDiffusionWebUI:/webui-data"
|
||||
];
|
||||
opts = [
|
||||
"--network=host"
|
||||
"--device=/dev/kfd"
|
||||
"--device=/dev/dri"
|
||||
"--group-add=video"
|
||||
"--ipc=host"
|
||||
"--cap-add=SYS_PTRACE"
|
||||
"--security-opt=seccomp=unconfined"
|
||||
];
|
||||
extraConfig = {
|
||||
entrypoint = "/webui-data/launch.sh";
|
||||
};
|
||||
});
|
||||
|
||||
# Multimedia
|
||||
jellyfin = mkIf cfg.jellyfin.enable (mkOciContainer {
|
||||
image = "linuxserver/jellyfin:10.8.10";
|
||||
|
@ -14,6 +14,9 @@ with mylib.modules; {
|
||||
homeassistant = {
|
||||
enable = mkEnableOpt "Enable HomeAssistant Container";
|
||||
};
|
||||
stablediffusion = {
|
||||
enable = mkEnableOpt "Enable StableDiffusion Container with Automatic1111 WebUI";
|
||||
};
|
||||
jellyfin = {
|
||||
enable = mkEnableOpt "Enable Jellyfin Container";
|
||||
};
|
||||
|
@ -19,6 +19,7 @@
|
||||
enable = true;
|
||||
|
||||
homeassistant.enable = false;
|
||||
stablediffusion.enable = true;
|
||||
jellyfin.enable = true;
|
||||
fileflows.enable = false;
|
||||
sonarr.enable = true;
|
||||
|
Reference in New Issue
Block a user