1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/immich_ynh.git synced 2024-09-03 20:36:24 +02:00
immich_ynh/conf/immich-machine-learning-start.sh

22 lines
573 B
Bash
Raw Normal View History

2024-03-26 06:53:38 +01:00
#!/bin/bash
set -a
2024-06-14 13:59:30 +02:00
source "__INSTALL_DIR__/env-machine-learning"
2024-03-26 06:53:38 +01:00
set +a
cd "__INSTALL_DIR__/app/machine-learning"
source venv/bin/activate
2024-06-14 13:59:30 +02:00
: "${IMMICH_HOST:=127.0.0.1}"
: "${IMMICH_PORT:=__PORT_MACHINELEARNING__}"
2024-03-26 06:53:38 +01:00
: "${MACHINE_LEARNING_WORKERS:=1}"
: "${MACHINE_LEARNING_WORKER_TIMEOUT:=120}"
exec gunicorn app.main:app \
-k app.config.CustomUvicornWorker \
2024-06-14 13:59:30 +02:00
-b "$IMMICH_HOST":"$IMMICH_PORT" \
2024-03-26 06:53:38 +01:00
-w "$MACHINE_LEARNING_WORKERS" \
-t "$MACHINE_LEARNING_WORKER_TIMEOUT" \
--log-config-json log_conf.json \
--graceful-timeout 0