Compare commits

...

9 Commits

9 changed files with 125 additions and 23 deletions

16
.editorconfig Normal file
View File

@@ -0,0 +1,16 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
quote_type = single
[{Makefile,**.mk}]
indent_style = tab

4
.prettierrc Normal file
View File

@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}

View File

@@ -4,7 +4,7 @@ metadata:
name: immich-machine-learning name: immich-machine-learning
namespace: immich namespace: immich
annotations: annotations:
reloader.stakater.com/auto: "true" reloader.stakater.com/auto: 'true'
labels: labels:
app: immich-machine-learning app: immich-machine-learning
spec: spec:
@@ -52,14 +52,6 @@ spec:
name: immich-db-app name: immich-db-app
key: password key: password
optional: false optional: false
# Check this ENVs maybe it works also for other ML models
- name: MACHINE_LEARNING_PRELOAD__CLIP
value: ViT-B-32__openai
- name: MACHINE_LEARNING_PRELOAD__FACIAL_RECOGNITION
value: buffalo_l
# May not be needed
- name: MACHINE_LEARNING_EXECUTION_PROVIDERS
value: "OpenVINOExecutionProvider,CPUExecutionProvider"
envFrom: envFrom:
- configMapRef: - configMapRef:
name: immich name: immich
@@ -80,12 +72,12 @@ spec:
securityContext: securityContext:
privileged: true # for intel quick sync privileged: true # for intel quick sync
seccompProfile: seccompProfile:
type: "RuntimeDefault" type: 'RuntimeDefault'
volumeMounts: volumeMounts:
- name: immich-machine-learning - name: immich-machine-learning
mountPath: /cache mountPath: /cache
nodeSelector: nodeSelector:
intel.feature.node.kubernetes.io/gpu: "true" intel.feature.node.kubernetes.io/gpu: 'true'
volumes: volumes:
- name: immich-machine-learning - name: immich-machine-learning
persistentVolumeClaim: persistentVolumeClaim:

View File

@@ -7,9 +7,9 @@ metadata:
spec: spec:
imageRepositoryRef: imageRepositoryRef:
name: immich-machine-learning name: immich-machine-learning
policy:
# https://github.com/immich-app/immich/releases # https://github.com/immich-app/immich/releases
semver:
range: '2.*.*'
filterTags: filterTags:
pattern: 'v.*' pattern: '.*-openvino'
policy:
semver:
range: '2.x-0'

View File

@@ -8,10 +8,3 @@ spec:
# https://github.com/immich-app/immich/pkgs/container/immich-machine-learning # https://github.com/immich-app/immich/pkgs/container/immich-machine-learning
image: ghcr.io/immich-app/immich-machine-learning image: ghcr.io/immich-app/immich-machine-learning
interval: 24h interval: 24h
exclusionList:
- .*openvino
- .*cuda
- .*armnn
- pr*
- main
- main*

View File

@@ -0,0 +1,62 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: csi-driver-nfs
namespace: kube-system
labels:
app: csi-driver-nfs
spec:
chart:
spec:
# https://artifacthub.io/packages/helm/csi-driver-nfs/csi-driver-nfs/4.12.1
chart: csi-driver-nfs
reconcileStrategy: ChartVersion
sourceRef:
kind: HelmRepository
name: csi-driver-nfs
namespace: kube-system
version: '4.12.1' # fixed version because storage is important
interval: 24h
timeout: 10m
suspend: false
values:
# https://github.com/kubernetes-csi/csi-driver-nfs/tree/master/charts#latest-chart-configuration
# https://github.com/kubernetes-csi/csi-driver-nfs/blob/v4.12.1/charts/v4.12.1/csi-driver-nfs/values.yaml
controller:
resources:
csiProvisioner:
limits:
memory: 1Gi
requests:
cpu: 10m
memory: 20Mi
csiResizer:
limits:
memory: 1Gi
requests:
cpu: 10m
memory: 20Mi
csiSnapshotter:
limits:
memory: 1Gi
requests:
cpu: 10m
memory: 200Mi
livenessProbe:
limits:
memory: 1Gi
requests:
cpu: 10m
memory: 20Mi
nfs:
limits:
memory: 1Gi
requests:
cpu: 10m
memory: 20Mi

View File

@@ -0,0 +1,9 @@
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
name: csi-driver-nfs
namespace: kube-system
spec:
interval: 24h
url: https://raw.githubusercontent.com/kubernetes-csi/csi-driver-nfs/master/charts

View File

@@ -0,0 +1,13 @@
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: k8s-nfs-hdd
provisioner: nfs.csi.k8s.io
parameters:
server: unraid.example.internal
share: /mnt/user/k8s-nfs-hdd/
subDir: ${pvc.metadata.namespace}/${pvc.metadata.name}/
reclaimPolicy: Delete
volumeBindingMode: Immediate
allowVolumeExpansion: true

View File

@@ -0,0 +1,13 @@
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: k8s-nfs-ssd
provisioner: nfs.csi.k8s.io
parameters:
server: unraid.example.internal
share: /mnt/user/k8s-nfs-ssd/
subDir: ${pvc.metadata.namespace}/${pvc.metadata.name}/
reclaimPolicy: Delete
volumeBindingMode: Immediate
allowVolumeExpansion: true