Preliminary hw transcode support for Photoprism on pi4

This commit is contained in:
IamTheFij 2023-04-20 16:48:04 -07:00
parent f75d149f32
commit 1c14430c99

View File

@ -73,6 +73,15 @@ module "photoprism_module" {
ingress = true
service_port = 2342
sticky_disk = true
constraints = [{
attribute = "$${meta.hw_transcode.type}"
# operator = "is_set"
value = "raspberry"
}]
docker_devices = [{
host_path = "$${meta.hw_transcode.device}"
container_path = "$${meta.hw_transcode.device}"
}]
env = {
PHOTOPRISM_DEBUG = true
# UI
@ -126,6 +135,13 @@ module "photoprism_module" {
PHOTOPRISM_DATABASE_SERVER="{{ .Address }}:{{ .Port }}"
{{- end }}
{{- end }}
{{ if eq (env "meta.hw_transcode.type") "raspberry" -}}
PHOTOPRISM_FFMPEG_ENCODER=raspberry
PHOTOPRISM_FFMPEG_BUFFERS=64
{{ else if eq (env "meta.hw_transcode.type") "intel" -}}
PHOTOPRISM_FFMPEG_ENCODER=intel
PHOTOPRISM_INIT="intel tensorflow"
{{- end }}
EOF
dest_prefix = "$${NOMAD_SECRETS_DIR}/"
dest = "env"