测试应用 PhotoPrism

Signed-off-by: 萌森 <qyg2297248353@163.com>
This commit is contained in:
萌森 2024-08-22 12:46:31 +08:00
parent 492329c76a
commit 3da1ab4306
10 changed files with 403 additions and 0 deletions

View File

@ -0,0 +1,180 @@
additionalProperties:
formFields:
- child:
default: ""
envKey: PANEL_DB_HOST
required: true
type: service
default: mariadb
edit: true
envKey: PANEL_DB_TYPE
labelZh: MySQL 服务 (前置检查)
labelEn: Database Service (Pre-check)
required: true
type: apps
values:
- label: MySQL
value: mysql
- label: MariaDB
value: mariadb
- label: Percona
value: percona
- default: "/home/photoprism"
edit: true
envKey: PHOTOPRISM_ROOT_PATH
labelZh: 数据持久化路径
labelEn: Data persistence path
required: true
type: text
- default: 2342
edit: true
envKey: PANEL_APP_PORT_HTTP
labelZh: WebUI 端口
labelEn: WebUI port
required: true
rule: paramPort
type: number
- default: "admin"
edit: true
envKey: PHOTOPRISM_ADMIN_USER
labelZh: 管理员用户名
labelEn: Admin username
required: true
type: text
- default: "password_random"
edit: true
envKey: PHOTOPRISM_ADMIN_PASSWORD
labelZh: 管理员密码 (8-72 字符)
labelEn: Admin password
required: true
rule: paramComplexity
random: true
type: password
- default: "password"
edit: true
envKey: PHOTOPRISM_AUTH_MODE
labelZh: 认证模式
labelEn: Authentication mode
required: true
type: select
values:
- label: 密码
value: "password"
- label: 公开
value: "public"
- default: "http://127.0.0.1:2342"
edit: true
envKey: PHOTOPRISM_SITE_URL
labelZh: 网站 URL
labelEn: Site URL
required: true
type: text
- default: "AI-Powered Photos App"
edit: true
envKey: PHOTOPRISM_SITE_CAPTION
labelZh: 网站标题
labelEn: Site caption
required: true
type: text
- default: ""
edit: true
envKey: PHOTOPRISM_SITE_DESCRIPTION
labelZh: 网站描述
labelEn: Site description
required: false
type: text
- default: ""
edit: true
envKey: PHOTOPRISM_SITE_AUTHOR
labelZh: 网站作者
labelEn: Site author
required: false
type: text
- default: "127.0.0.1:3306"
edit: true
envKey: PHOTOPRISM_DATABASE_SERVER
labelZh: 数据库 地址
labelEn: Database Server
required: true
type: text
- default: "photoprism"
edit: true
envKey: PHOTOPRISM_DATABASE_USER
labelZh: 数据库 用户名
labelEn: Database Username
required: true
type: text
- default: ""
edit: true
envKey: PHOTOPRISM_DATABASE_PASSWORD
labelZh: 数据库 密码
labelEn: Database Password
required: true
type: password
- default: "photoprism"
edit: true
envKey: PHOTOPRISM_DATABASE_NAME
labelZh: 数据库 名称
labelEn: Database Name
required: true
type: text
- default: 5000
edit: true
envKey: PHOTOPRISM_ORIGINALS_LIMIT
labelZh: 原始文件限制最大值 (MB)
labelEn: Originals limit max value (MB)
required: true
type: number
- default: "true"
edit: true
envKey: PHOTOPRISM_BACKUP_DATABASE
labelZh: 开启定时备份计划
labelEn: Enable scheduled backup plan
required: true
type: select
values:
- label:
value: "true"
- label:
value: "false"
- default: "daily"
edit: true
envKey: PHOTOPRISM_BACKUP_SCHEDULE
labelZh: 定时备份计划周期 (daily, weekly, cron)
labelEn: Scheduled backup plan cycle (daily, weekly, cron format)
required: true
type: text
- default: "software"
edit: true
envKey: PHOTOPRISM_FFMPEG_ENCODER
labelZh: 视频编码器
labelEn: Video encoder
required: true
type: select
values:
- label: 软解
value: "software"
- label: 硬解 (Intel)
value: "intel"
- label: 硬解 (nvidia)
value: "nvidia"
- label: 硬解 (apple)
value: "apple"
- label: 硬解 (raspberry)
value: "raspberry"
- label: 硬解 (vaapi)
value: "vaapi"
- default: "1920"
edit: true
envKey: PHOTOPRISM_FFMPEG_SIZE
labelZh: 视频分辨率限制
labelEn: Video resolution limit
required: true
type: text
- default: "32"
edit: true
envKey: PHOTOPRISM_FFMPEG_BITRATE
labelZh: 视频比特率限制
labelEn: Video bitrate limit
required: true
type: text

View File

@ -0,0 +1,48 @@
version: "3.8"
networks:
1panel-network:
external: true
services:
photoprism:
image: photoprism/photoprism:240711
container_name: ${CONTAINER_NAME}
labels:
createdBy: "Apps"
restart: always
stop_grace_period: 10s
security_opt:
- seccomp:unconfined
- apparmor:unconfined
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}:2342
user: 1000:1000
working_dir: /photoprism
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
env_file:
- /etc/1panel/envs/global.env
- /etc/1panel/envs/photoprism/photoprism.env
- ${ENV_FILE:-/etc/1panel/envs/default.env}
volumes:
- ${PHOTOPRISM_ROOT_PATH}/originals:/photoprism/originals
- ${PHOTOPRISM_ROOT_PATH}/storage:/photoprism/storage
- ${PHOTOPRISM_ROOT_PATH}/family:/photoprism/originals/family
- ${PHOTOPRISM_ROOT_PATH}/import:/photoprism/import
environment:
PHOTOPRISM_UID: 0
PHOTOPRISM_GID: 0
PHOTOPRISM_UMASK: 0022
PHOTOPRISM_PASSWORD_LENGTH: 8
PHOTOPRISM_ADMIN_USERNAME: ${PHOTOPRISM_ADMIN_USER}
PHOTOPRISM_DATABASE_DRIVER: "mysql"

View File

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

92
apps/photoprism/README.md Normal file
View File

@ -0,0 +1,92 @@
# PhotoPrism
面向去中心化网络的人工智能照片应用程序
![Bark](https://file.lifebus.top/imgs/photoprism_cover.jpg)
PhotoPrism® 是一款适用于去中心化网络的人工智能照片应用程序。它利用最新技术自动标记和查找图片,而不会妨碍您。您可以在家中、私人服务器上或在云中运行它。
![](https://img.shields.io/badge/%E6%96%B0%E7%96%86%E8%90%8C%E6%A3%AE%E8%BD%AF%E4%BB%B6%E5%BC%80%E5%8F%91%E5%B7%A5%E4%BD%9C%E5%AE%A4-%E6%8F%90%E4%BE%9B%E6%8A%80%E6%9C%AF%E6%94%AF%E6%8C%81-blue)
## 特性
我们的使命是提供对用户和隐私最友好的解决方案,让您的图片井然有序且易于访问。这就是为什么 PhotoPrism
是从头开始构建的,可以在您需要的任何地方运行,而不会影响自由、隐私或功能:
+ 浏览所有照片和视频无需担心RAW 转换、重复或视频格式
+ 使用强大的搜索过滤器轻松查找特定图片
+ 认出家人和朋友的面孔
+ 根据图片内容和位置自动分类
+ 将鼠标悬停在相册和搜索结果中的实时照片上即可播放它们
+ 由于用户界面是渐进式 Web 应用程序,因此它提供了类似本机应用程序的体验,您可以方便地将其安装在所有主要操作系统和移动设备的主屏幕上
+ 包括四张高分辨率世界地图,带回您最喜欢的旅行的回忆
+ 元数据从 Exif、XMP 和其他来源(例如 Google Photos中提取并合并
+ 还可以搜索更多图像属性例如Colors 、 Chroma和Quality
+ 使用PhotoSync在后台安全备份 iOS 和 Android 手机
+ WebDAV 客户端(例如 Microsoft 的 Windows Explorer 和 Apple 的 Finder可以直接连接到
PhotoPrism允许您从计算机中打开、编辑和删除文件就像它们是本地文件一样
## 环境说明
由于 `PhotoPrism` 有依赖于 `FFmpeg`,所以需要在安装时进行自动安装。
`PhotoPrism` 会自动安装 `FFmpeg`,并且会在初始化时进行检测。
由于使用 `TensorFlow` 进行人脸识别,等相关数据处理,所以需要在安装时进行自动安装。
`PhotoPrism` 会自动安装 `TensorFlow`,并且会在初始化时进行检测。
建议用户开启 至少 `4GB` 交换分区,增大内存使用。
## 安装说明
推荐使用 `MariaDB` 数据库,作为 `PhotoPrism` 的数据库存储。
### `数据库 地址` 配置
格式:`host:port`
示例:`127.0.0.1:3306`
### `认证模式` 配置
默认值:`密码`
程序必须登录才能使用。
如果您选择: `公开`
那么任何人都将允许访问程序。
### `视频编码器` 配置
`PhotoPrism` 支持 `FFmpeg` 视频编码器,需要安装 `FFmpeg`
初始化时,`PhotoPrism` 会自动进行 `FFmpeg` 的安装。
使用 `FFmpeg` 时,需要选择 `软解`
如果您的设备存在其他硬件驱动,可以选择 `硬解` 的方式加速 `视频转码`
很不幸的是 Windows 下不能很好的映射驱动程序,所以 `硬解` 选项在 Windows 下不可用。
### `视频分辨率限制` 配置
默认值: `1920`,表达为 `1920x1080`
当转码低于此分辨率的视频时,`PhotoPrism` 会保持原始分辨率,不会将其放大处理。
### `视频比特率限制` 配置
默认值: `32`,单位为 `Mbit/s`
如果有需要,可以根据自己的需求进行调整。
## 设备同步 PhotoSync
![App Store](https://file.lifebus.top/imgs/photosync_app_store_qr.png)
![App Store](https://file.lifebus.top/imgs/photosync_google_play_qr.png)
---
![Ms Studio](https://file.lifebus.top/imgs/ms_blank_001.png)

18
apps/photoprism/data.yml Normal file
View File

@ -0,0 +1,18 @@
name: PhotoPrism
title: PhotoPrism
description: 面向去中心化网络的人工智能照片应用程序
additionalProperties:
key: photoprism
name: PhotoPrism
tags:
- WebSite
- Tool
- Local
shortDescZh: 面向去中心化网络的人工智能照片应用程序
shortDescEn: 面向去中心化网络的人工智能照片应用程序
type: website
crossVersionUpdate: true
limit: 0
website: https://www.photoprism.app/
github: https://github.com/photoprism/photoprism/
document: https://docs.photoprism.app/

BIN
apps/photoprism/img.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
apps/photoprism/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1,25 @@
PHOTOPRISM_DISABLE_TLS="false"
PHOTOPRISM_DEFAULT_TLS="true"
PHOTOPRISM_HTTP_COMPRESSION="gzip"
PHOTOPRISM_LOG_LEVEL="info"
PHOTOPRISM_READONLY="false"
PHOTOPRISM_EXPERIMENTAL="false"
PHOTOPRISM_DISABLE_CHOWN="false"
PHOTOPRISM_DISABLE_WEBDAV="false"
PHOTOPRISM_DISABLE_SETTINGS="false"
PHOTOPRISM_DISABLE_TENSORFLOW="false"
PHOTOPRISM_DISABLE_FACES="false"
PHOTOPRISM_DISABLE_CLASSIFICATION="false"
PHOTOPRISM_DISABLE_VECTORS="false"
PHOTOPRISM_DISABLE_RAW="false"
PHOTOPRISM_RAW_PRESETS="false"
PHOTOPRISM_SIDECAR_YAML="true"
PHOTOPRISM_BACKUP_ALBUMS="true"
PHOTOPRISM_BACKUP_DATABASE="true"
PHOTOPRISM_BACKUP_SCHEDULE="daily"
PHOTOPRISM_INDEX_SCHEDULE=""
PHOTOPRISM_AUTO_INDEX=300
PHOTOPRISM_AUTO_IMPORT=-1
PHOTOPRISM_DETECT_NSFW="false"
PHOTOPRISM_UPLOAD_NSFW="true"
PHOTOPRISM_INIT="https gpu ffmpeg tensorflow"