Update 3 files
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 13s
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 13s
This commit is contained in:
@@ -27,6 +27,13 @@ DB_DATABASE_NAME=immich
|
|||||||
# Example: "/mnt/photos:/photos:ro,/mnt/archive:/archive:ro"
|
# Example: "/mnt/photos:/photos:ro,/mnt/archive:/archive:ro"
|
||||||
EXTERNAL_LIBRARIES=""
|
EXTERNAL_LIBRARIES=""
|
||||||
|
|
||||||
# Machine Learning settings
|
# Machine Learning GPU Acceleration
|
||||||
# For GPU acceleration, change to: release-cuda, release-openvino, or release-armnn
|
# Options:
|
||||||
|
# release - CPU only (default)
|
||||||
|
# release-cuda - NVIDIA GPU
|
||||||
|
# release-openvino - Intel GPU (Iris Xe, Arc)
|
||||||
|
# release-armnn - ARM GPU
|
||||||
ML_IMAGE_TAG=release
|
ML_IMAGE_TAG=release
|
||||||
|
|
||||||
|
# Enable GPU device access (set to "true" for openvino or cuda)
|
||||||
|
ML_GPU_ENABLED=false
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ services:
|
|||||||
|
|
||||||
immich-machine-learning:
|
immich-machine-learning:
|
||||||
container_name: ${CONTAINER_NAME}_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:
|
volumes:
|
||||||
- ${CONTAINER_NAME}_model_cache:/cache
|
- ${CONTAINER_NAME}_model_cache:/cache
|
||||||
environment:
|
environment:
|
||||||
@@ -33,6 +33,7 @@ services:
|
|||||||
- DB_DATABASE_NAME=${DB_DATABASE_NAME}
|
- DB_DATABASE_NAME=${DB_DATABASE_NAME}
|
||||||
- DB_HOSTNAME=${CONTAINER_NAME}_postgres
|
- DB_HOSTNAME=${CONTAINER_NAME}_postgres
|
||||||
- REDIS_HOSTNAME=${CONTAINER_NAME}_redis
|
- REDIS_HOSTNAME=${CONTAINER_NAME}_redis
|
||||||
|
#GPU_PLACEHOLDER#
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
disable: false
|
disable: false
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ _check_required_env_vars "CONTAINER_NAME" "UPLOAD_LOCATION" "DB_DATA_LOCATION" "
|
|||||||
# Set defaults
|
# Set defaults
|
||||||
IMMICH_VERSION="${IMMICH_VERSION:-release}"
|
IMMICH_VERSION="${IMMICH_VERSION:-release}"
|
||||||
ML_IMAGE_TAG="${ML_IMAGE_TAG:-release}"
|
ML_IMAGE_TAG="${ML_IMAGE_TAG:-release}"
|
||||||
|
ML_GPU_ENABLED="${ML_GPU_ENABLED:-false}"
|
||||||
WEB_PORT="${WEB_PORT:-2283}"
|
WEB_PORT="${WEB_PORT:-2283}"
|
||||||
DB_USERNAME="${DB_USERNAME:-postgres}"
|
DB_USERNAME="${DB_USERNAME:-postgres}"
|
||||||
DB_DATABASE_NAME="${DB_DATABASE_NAME:-immich}"
|
DB_DATABASE_NAME="${DB_DATABASE_NAME:-immich}"
|
||||||
@@ -24,6 +25,16 @@ echo "Generating docker-compose.yml..."
|
|||||||
envsubst < docker-compose.yml.template > docker-compose.yml \
|
envsubst < docker-compose.yml.template > docker-compose.yml \
|
||||||
|| _die "Failed to generate 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 data directories
|
||||||
_create_folder "${UPLOAD_LOCATION}"
|
_create_folder "${UPLOAD_LOCATION}"
|
||||||
_create_folder "${DB_DATA_LOCATION}"
|
_create_folder "${DB_DATA_LOCATION}"
|
||||||
|
|||||||
Reference in New Issue
Block a user