Skip to content

feat: add Immich Remote Machine Learning LXC - #2737

Closed
jwklijnsma wants to merge 6 commits into
community-scripts:mainfrom
jwklijnsma:add-immich-remote-ml-v2
Closed

jwklijnsma wants to merge 6 commits into
community-scripts:mainfrom
jwklijnsma:add-immich-remote-ml-v2

Conversation

@jwklijnsma

Copy link
Copy Markdown

✍️ Description

Adds a native, Docker-free Immich Remote Machine Learning LXC that serves Immich's ML API on TCP port 3003. The installer follows the upstream machine-learning/pyproject.toml, uv.lock, README.md, and ROCm production dependencies from the Immich Dockerfile, using the existing setup_hwaccel helper for AMD GPU passthrough and a CPU fallback when ROCm is unavailable. The virtual environment, Hugging Face cache, and runtime data are stored outside the replaceable source directory; validation completed with bash -n and JSON parsing, but Proxmox/ROCm runtime testing is still required. Generated with GPT-6 (high reasoning effort) and reviewed against the DevScripts AGENTS.md and PR template.

🔗 Related PR / Issue

Link: #

✅ Prerequisites (X in brackets)

  • Self-review completed – Reviewed against DevScripts AGENTS.md and checked the generated files.
  • Tested thoroughly – Syntax and metadata checks passed; no live Proxmox/ROCm test has been performed yet.
  • No breaking changes – Adds three new files only.
  • No security risks – The ML API has no authentication; the metadata warns administrators to restrict port 3003 to trusted clients.

🧩 Script

Name: Immich Remote ML

Tool: Standalone Immich machine-learning service for facial recognition and smart search, intended to run separately from the Immich server. It supports AMD ROCm acceleration when a compatible GPU is passed through, with CPU fallback.

🗂️ Category (X in brackets)

  • CT – LXC container (ct/ + install/)
  • VM – Virtual machine (vm/)
  • Addon – tools/addon/
  • PVE Tool – tools/pve/
  • Other – path given in the Description

🖥️ Platform – tested on (X in brackets)

  • Proxmox VE – Created on a Proxmox VE host and the app works.
  • Incus – Created on an Incus host and the app works.

🏗️ Architecture (X in brackets)

  • arm64 supported - Tested and supported on arm64.
  • arm64 not tested - Assumed to work on arm64, but testing has not been done.
  • arm64 not supported - ROCm and Immich's ROCm ONNX Runtime backend are amd64-only.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves a bug.
  • ✨ New feature – Adds a new, non-breaking feature.
  • 💥 Breaking change – Alters existing functionality.
  • 🆕 New script – A new CT script, installer, and metadata.
  • 🌍 Website update – Website-related metadata only.
  • 🔧 Refactoring / Code Cleanup – Refactoring.
  • 📝 Documentation update – Documentation only.

🔍 Code & Security Review (X in brackets)

  • Follows CODE-AUDIT.md & CONTRIBUTING.md guidelines
  • Uses correct script structure (AppName.sh, AppName-install.sh, AppName.json)
  • No hardcoded credentials
  • No Docker / Docker Compose – The service is installed bare-metal; Docker is not used.
  • No git pull – Updates use check_for_gh_release and fetch_and_deploy_gh_release.

📋 Additional Information (optional)

The machine-learning endpoint is unauthenticated by upstream design. Restrict TCP port 3003 at the Proxmox firewall or network layer to the Immich server and trusted clients. For unsupported gfx1030 GPUs, the generated /etc/default/immich-remote-ml file can be extended with HSA_OVERRIDE_GFX_VERSION=10.3.0.


📦 Application Requirements (for new scripts)

  • The application is at least 6 months old
  • The application is actively maintained
  • The application has 1,000+ GitHub stars
  • Official release tarballs are published
  • I understand that not all scripts will be accepted due to various reasons and criteria by the community-scripts ORG

🌐 Source


🤖 AI Assistance (X in brackets)

  • No AI used – Scripts were written without AI assistance.
  • AI was used – The scripts were drafted using DevScripts AGENTS.md and .github/agents/pve-script-creator.agent.md as guidance, then reviewed and adjusted to match the repository structure.

GPT-6, high reasoning effort, used to research the upstream Immich machine-learning implementation, draft the CT/install/metadata files, and review the generated scripts.

@github-actions

Copy link
Copy Markdown
Contributor

Try this branch

The engine and the scripts resolve independently, so this runs the changed
ct/ and install/ scripts against the production engine:

export COMMUNITY_SCRIPTS_URL=https://raw.githubusercontent.com/jwklijnsma/DevScripts/add-immich-remote-ml-v2
bash -c "$(curl -fsSL "$COMMUNITY_SCRIPTS_URL/ct/immich-remote-ml.sh")"

Both lines are needed. Without COMMUNITY_SCRIPTS_URL the engine falls back to
main, so curling the branch URL on its own gives you the ct/ script from
this PR and the install/ script from main. Frequently the one you meant to test.

The same command works on an Incus host: the engine detects the platform and
loads the matching backend, while the scripts still come from this branch.

Useful while testing

dev_mode=net logs every fetch with status and URL, which is the quickest way
to confirm the branch is really being used. dev_mode=keep stops a failed
build from deleting the container along with the evidence.

export COMMUNITY_SCRIPTS_URL=https://raw.githubusercontent.com/jwklijnsma/DevScripts/add-immich-remote-ml-v2
dev_mode=net,keep bash -c "$(curl -fsSL "$COMMUNITY_SCRIPTS_URL/ct/immich-remote-ml.sh")"
Against a core branch as well

Add COMMUNITY_SCRIPTS_CORE_URL=https://raw.githubusercontent.com/OWNER/core/BRANCH
to test an engine change at the same time. The two resolve independently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant