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:
@@ -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}"
|
||||
|
||||
Reference in New Issue
Block a user