fix(immich): 1.118.0 port change, fix ML pull jobs

This commit is contained in:
JJGadgets
2024-10-26 09:50:29 +08:00
parent d9addb7654
commit 369dddc0a5

View File

@@ -1,4 +1,5 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/common-3.4.0/charts/other/app-template/schemas/helmrelease-helm-v2beta2.schema.json
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
@@ -9,7 +10,7 @@ spec:
chart:
spec:
chart: app-template
version: 3.1.0
version: 3.4.0
sourceRef:
name: bjw-s
kind: HelmRepository
@@ -139,7 +140,7 @@ spec:
limits:
cpu: "1000m"
memory: "6Gi"
ml-model-pull:
ml-model-pull-clip: &ml-model-pull
type: cronjob
cronjob:
schedule: "@daily"
@@ -148,16 +149,12 @@ spec:
labels:
egress.home.arpa/internet: allow
containers:
main:
main: &ml-model-pull-ct
image:
repository: ghcr.io/immich-app/immich-machine-learning
tag: v1.118.2@sha256:4d89a309fd08a93649f1ae4a7572ae98f09d66b4c1dfb7916b71d31dec7eda38
command: ["tini", "--"]
args: ["/bin/sh", "-c", "tini -s -g -- /bin/sh -c 'exec ./start.sh' & read -t 600 || kill -SIGINT $!"] # run for 10 minutes to pull models via preload, then kill process, hopefully it doesn't crash
env:
# default models as of v1.112.1
MACHINE_LEARNING_PRELOAD__CLIP: ViT-B-32__openai
MACHINE_LEARNING_PRELOAD__FACIAL_RECOGNITION: buffalo_l
command: ["huggingface-cli", "download", "--resume-download", "--exclude", ".git", "--cache-dir", "/ml-model-pull-tmp", "--local-dir-use-symlinks", "False", "--local-dir"] # Immich ML image installs huggingface-cli
args: ["/cache/clip/ViT-B-32__openai", "immich-app/ViT-B-32__openai"]
securityContext: *sc
resources:
requests:
@@ -165,6 +162,12 @@ spec:
limits:
cpu: "1000m"
memory: "1Gi"
ml-model-pull-facial:
<<: *ml-model-pull
containers:
main:
<<: *ml-model-pull-ct
args: ["/cache/facial-recognition/buffalo_l", "immich-app/buffalo_l"]
redis:
type: deployment
replicas: 1
@@ -187,7 +190,7 @@ spec:
controller: immich
ports:
http:
port: 3001
port: 2283
metrics:
port: 8081
microservices:
@@ -241,16 +244,24 @@ spec:
- subPath: thumbs
path: /data/thumbs
microservices: *misc
ml:
ml-model-pull-clip:
main:
- &mlpvc
subPath: ml-models-cache
path: /cache
readOnly: true
ml-model-pull:
readOnly: false
ml-model-pull-facial:
main:
- <<: *mlpvc
readOnly: false
ml:
main:
- <<: *mlpvc
readOnly: true
tmp-ml-pull:
type: emptyDir
globalMounts:
- subPath: tmp
path: /ml-model-pull-tmp
tmp:
type: emptyDir
medium: Memory