use nvidia for ml and use smb for pictures storage
This commit is contained in:
27
cluster/apps/immich/immich-pv.yml
Normal file
27
cluster/apps/immich/immich-pv.yml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
pv.kubernetes.io/provisioned-by: smb.csi.k8s.io
|
||||||
|
name: immich-pictures-pv
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
capacity:
|
||||||
|
storage: 100Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
persistentVolumeReclaimPolicy: Retain
|
||||||
|
storageClassName: immich-pictures-pv
|
||||||
|
mountOptions:
|
||||||
|
- dir_mode=0777
|
||||||
|
- file_mode=0777
|
||||||
|
csi:
|
||||||
|
driver: smb.csi.k8s.io
|
||||||
|
volumeHandle: 10.0.0.123#pictures#immich
|
||||||
|
volumeAttributes:
|
||||||
|
source: //10.0.0.123/pictures
|
||||||
|
nodeStageSecretRef:
|
||||||
|
name: smb-creds
|
||||||
|
namespace: default
|
||||||
|
|
||||||
@@ -11,3 +11,18 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
storage: 10Gi
|
storage: 10Gi
|
||||||
|
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: immich-pictures-pvc
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
storageClassName: immich-pictures-pv
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,9 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: immich-app
|
app: immich-app
|
||||||
spec:
|
spec:
|
||||||
|
runtimeClassName: nvidia
|
||||||
|
nodeSelector:
|
||||||
|
hardware-type: nvidia
|
||||||
initContainers:
|
initContainers:
|
||||||
- name: wait-for-redis
|
- name: wait-for-redis
|
||||||
image: busybox
|
image: busybox
|
||||||
@@ -37,7 +40,7 @@ spec:
|
|||||||
done
|
done
|
||||||
containers:
|
containers:
|
||||||
- name: immich-server
|
- name: immich-server
|
||||||
image: ghcr.io/immich-app/immich-server:v1.131.3
|
image: ghcr.io/immich-app/immich-server:v1.132.3
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 2283
|
- containerPort: 2283
|
||||||
env:
|
env:
|
||||||
@@ -60,20 +63,27 @@ spec:
|
|||||||
- mountPath: /usr/src/app/upload
|
- mountPath: /usr/src/app/upload
|
||||||
name: pictures
|
name: pictures
|
||||||
- name: immich-machine-learning
|
- name: immich-machine-learning
|
||||||
image: ghcr.io/immich-app/immich-machine-learning:v1.131.2
|
image: ghcr.io/immich-app/immich-machine-learning:v1.132.3-cuda
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 3003
|
- containerPort: 3003
|
||||||
env:
|
env:
|
||||||
- name: REDIS_HOSTNAME
|
- name: REDIS_HOSTNAME
|
||||||
value: "immich-redis-service"
|
value: "immich-redis-service"
|
||||||
|
- name: NVIDIA_VISIBLE_DEVICES
|
||||||
|
value: "all"
|
||||||
|
- name: MACHINE_LEARNING_DEVICE_IDS
|
||||||
|
value: "0"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /cache
|
- name: model-cache
|
||||||
name: model-cache
|
mountPath: /cache
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
nvidia.com/gpu: 1
|
||||||
volumes:
|
volumes:
|
||||||
- name: pictures
|
- name: pictures
|
||||||
nfs:
|
persistentVolumeClaim:
|
||||||
server: 10.0.0.123
|
claimName: immich-pictures-pvc
|
||||||
path: /pictures
|
|
||||||
- name: model-cache
|
- name: model-cache
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: longhorn-immich-cache
|
claimName: longhorn-immich-cache
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user