Files
nix/packages/docker/immich-machine-learning/default.nix
Nikolaos Karaolidis 492b643d8b Add immich
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2025-09-30 10:13:59 +01:00

42 lines
813 B
Nix

{ pkgs, ... }:
let
entrypoint = pkgs.writeTextFile {
name = "entrypoint";
executable = true;
destination = "/bin/entrypoint";
text = builtins.readFile ./entrypoint.sh;
};
in
pkgs.dockerTools.buildImage {
name = "immich-machine-learning";
fromImage = pkgs.docker-image-base;
copyToRoot = pkgs.buildEnv {
name = "root";
paths = with pkgs; [
entrypoint
immich-machine-learning
];
pathsToLink = [
"/bin"
"/lib"
"/share"
"/nix-support"
];
};
config = {
Entrypoint = [ "entrypoint" ];
Volumes = {
"/tmp/immich-machine-learning" = { };
};
Env = [
"IMMICH_LOG_LEVEL=warn"
"MACHINE_LEARNING_CACHE_FOLDER=/tmp/immich-machine-learning"
];
ExposedPorts = {
"3003/tcp" = { };
};
};
}