完善 Immich

Signed-off-by: Meng Sen <qyg2297248353@gmail.com>
This commit is contained in:
Meng Sen
2025-08-18 10:22:39 +08:00
parent baa3e27bcb
commit 52f7f96911
7 changed files with 140 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
additionalProperties:
formFields:
- default: "/home/immich-machine-learning"
edit: true
envKey: IMMICH_ROOT_PATH
labelZh: 数据持久化路径
labelEn: Data persistence path
required: true
type: text
- default: 2283
edit: true
envKey: PANEL_APP_PORT_HTTP
labelZh: API 端口
labelEn: API port
required: true
rule: paramPort
type: number
- default: "/dev/dri"
edit: true
envKey: IMMICH_DRIVE_PATH
labelZh: 硬件驱动路径
labelEn: Drive path
required: true
type: text
- default: "Asia/Shanghai"
edit: true
envKey: TZ
labelZh: 时区
labelEn: Timezone
required: true
type: text
- default: "XLM-Roberta-Large-Vit-B-16Plus"
edit: true
envKey: MACHINE_LEARNING_PRELOAD__CLIP
labelEn: Machine Learning Preload Model
labelZh: 机器学习 预加载模型
required: false
type: text
- default: "buffalo_l"
edit: true
envKey: MACHINE_LEARNING_PRELOAD__FACIAL_RECOGNITION
labelEn: Machine Learning Preload Model
labelZh: 人脸识别 预加载模型
required: false
type: select
values:
- label: antelopev2
value: "antelopev2"
- label: buffalo_l
value: "buffalo_l"
- label: buffalo_m
value: "buffalo_m"
- label: buffalo_s
value: "buffalo_s"
- default: "https://hf-mirror.com"
edit: true
envKey: HF_ENDPOINT
labelZh: Hugging Face 服务地址
labelEn: Hugging Face Endpoint
required: false
type: text

View File

@@ -0,0 +1,31 @@
networks:
1panel-network:
external: true
name: immich-machine-learning
services:
immich-machine-learning:
image: ghcr.io/immich-app/immich-machine-learning:v1.138.0
container_name: immich-machine-learning-${CONTAINER_NAME}
labels:
createdBy: "Apps"
restart: always
networks:
- 1panel-network
devices:
- /dev/dri:/dev/dri
# - /dev/nvidia0:/dev/nvidia0
# - /dev/nvidiactl:/dev/nvidiactl
# - /dev/nvidia-modeset:/dev/nvidia-modeset
# - /dev/nvidia-nvswitchctl:/dev/nvidia-nvswitchctl
# - /dev/nvidia-uvm:/dev/nvidia-uvm
# - /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools
# - /dev/video11:/dev/video11
ports:
- ${PANEL_APP_PORT_HTTP}:3003
env_file:
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
- ${ENV_FILE:-/etc/1panel/envs/default.env}
volumes:
- ${IMMICH_ROOT_PATH}/data/cache:/cache

View File

@@ -0,0 +1,2 @@
# copyright© 2024 XinJiang Ms Studio
ENV_FILE=.env

View File

@@ -0,0 +1,2 @@
# copyright© 2024 XinJiang Ms Studio
TZ=Asia/Shanghai

View File

@@ -0,0 +1,17 @@
#!/bin/bash
if [ -f .env ]; then
source .env
# setup-1 add default values
CURRENT_DIR=$(pwd)
sed -i '/^ENV_FILE=/d' .env
sed -i '/^GLOBAL_ENV_FILE=/d' .env
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi

View File

@@ -0,0 +1,10 @@
#!/bin/bash
if [ -f .env ]; then
source .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi

View File

@@ -0,0 +1,17 @@
#!/bin/bash
if [ -f .env ]; then
source .env
# setup-1 add default values
CURRENT_DIR=$(pwd)
sed -i '/^ENV_FILE=/d' .env
sed -i '/^GLOBAL_ENV_FILE=/d' .env
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
echo "GLOBAL_ENV_FILE=${CURRENT_DIR}/envs/global.env" >> .env
echo "Check Finish."
else
echo "Error: .env file not found."
fi