Update 3 files
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 13s

This commit is contained in:
j
2026-01-15 11:33:26 +13:00
parent 710c28aae0
commit 10ec03d1e8
3 changed files with 22 additions and 3 deletions

View File

@@ -27,6 +27,13 @@ DB_DATABASE_NAME=immich
# Example: "/mnt/photos:/photos:ro,/mnt/archive:/archive:ro"
EXTERNAL_LIBRARIES=""
# Machine Learning settings
# For GPU acceleration, change to: release-cuda, release-openvino, or release-armnn
# Machine Learning GPU Acceleration
# Options:
# release - CPU only (default)
# release-cuda - NVIDIA GPU
# release-openvino - Intel GPU (Iris Xe, Arc)
# release-armnn - ARM GPU
ML_IMAGE_TAG=release
# Enable GPU device access (set to "true" for openvino or cuda)
ML_GPU_ENABLED=false

View File

@@ -24,7 +24,7 @@ services:
immich-machine-learning:
container_name: ${CONTAINER_NAME}_machine_learning
image: ghcr.io/immich-app/immich-machine-learning:${ML_IMAGE_TAG:-release}
image: ghcr.io/immich-app/immich-machine-learning:${ML_IMAGE_TAG}
volumes:
- ${CONTAINER_NAME}_model_cache:/cache
environment:
@@ -33,6 +33,7 @@ services:
- DB_DATABASE_NAME=${DB_DATABASE_NAME}
- DB_HOSTNAME=${CONTAINER_NAME}_postgres
- REDIS_HOSTNAME=${CONTAINER_NAME}_redis
#GPU_PLACEHOLDER#
restart: unless-stopped
healthcheck:
disable: false

View File

@@ -9,6 +9,7 @@ _check_required_env_vars "CONTAINER_NAME" "UPLOAD_LOCATION" "DB_DATA_LOCATION" "
# Set defaults
IMMICH_VERSION="${IMMICH_VERSION:-release}"
ML_IMAGE_TAG="${ML_IMAGE_TAG:-release}"
ML_GPU_ENABLED="${ML_GPU_ENABLED:-false}"
WEB_PORT="${WEB_PORT:-2283}"
DB_USERNAME="${DB_USERNAME:-postgres}"
DB_DATABASE_NAME="${DB_DATABASE_NAME:-immich}"
@@ -24,6 +25,16 @@ echo "Generating docker-compose.yml..."
envsubst < docker-compose.yml.template > docker-compose.yml \
|| _die "Failed to generate docker-compose.yml"
# Add GPU configuration if enabled
if [ "$ML_GPU_ENABLED" = "true" ]; then
echo "Enabling GPU acceleration..."
GPU_CONFIG=" devices:\n - /dev/dri:/dev/dri"
sed -i "s|#GPU_PLACEHOLDER#|${GPU_CONFIG}|" docker-compose.yml
else
# Remove the placeholder
sed -i '/#GPU_PLACEHOLDER#/d' docker-compose.yml
fi
# Create data directories
_create_folder "${UPLOAD_LOCATION}"
_create_folder "${DB_DATA_LOCATION}"