immich/server/start.sh
Mert ee49f470b7
feat(server): transcoding hardware acceleration (#3171)
* added transcode configs for nvenc,qsv and vaapi

* updated dev docker compose

* added software fallback

* working vaapi

* minor fixes and added tests

* updated api

* compile libvips

* move hwaccel settings to `hwaccel.yml`

* changed default dockerfile, moved `readdir` call

* removed unused import

* minor cleanup

* fix for arm build

* added documentation, minor fixes

* added intel driver

* updated docs

styling

* uppercase codec and api names

* formatting

* added tests

* updated docs

* removed semicolons

* added link to `hwaccel.yml`

* added newlines

* added `hwaccel` section to docker-compose.prod.yml

* ensure mesa drivers are installed

* switch to mimalloc for sharp

* moved build version and sha256 to json

* let libmfx set the render device

* possible fix for vp9 on qsv

* updated tests

* formatting

* review suggestions

* semicolon

* moved `LD_PRELOAD` to start script

* switched to jellyfin's ffmpeg package

* fixed dockerfile

* use cqp instead of icq for qsv vp9

* updated dockerfile

* added sha256sum for other platforms

* fixtures
2023-08-01 20:56:10 -05:00

36 lines
745 B
Bash
Executable File

#!/bin/sh
export LD_PRELOAD=/usr/lib/$(arch)-linux-gnu/libmimalloc.so.2
if [ "$DB_URL_FILE" ]; then
export DB_URL=$(cat $DB_URL_FILE)
unset DB_URL_FILE
fi
if [ "$DB_HOSTNAME_FILE" ]; then
export DB_HOSTNAME=$(cat $DB_HOSTNAME_FILE)
unset DB_HOSTNAME_FILE
fi
if [ "$DB_DATABASE_NAME_FILE" ]; then
export DB_DATABASE_NAME=$(cat $DB_DATABASE_NAME_FILE)
unset DB_DATABASE_NAME_FILE
fi
if [ "$DB_USERNAME_FILE" ]; then
export DB_USERNAME=$(cat $DB_USERNAME_FILE)
unset DB_USERNAME_FILE
fi
if [ "$DB_PASSWORD_FILE" ]; then
export DB_PASSWORD=$(cat $DB_PASSWORD_FILE)
unset DB_PASSWORD_FILE
fi
if [ "$REDIS_PASSWORD_FILE" ]; then
export REDIS_PASSWORD=$(cat $REDIS_PASSWORD_FILE)
unset REDIS_PASSWORD_FILE
fi
exec node dist/main $1