Skip to content

Add AMD AMF & ROCm DockerMod (encode + compute)#17

Open
lusoris wants to merge 2 commits into
fileflows:mainfrom
lusoris:add-amd-amf-rocm-dockermod
Open

Add AMD AMF & ROCm DockerMod (encode + compute)#17
lusoris wants to merge 2 commits into
fileflows:mainfrom
lusoris:add-amd-amf-rocm-dockermod

Conversation

@lusoris

@lusoris lusoris commented Jun 1, 2026

Copy link
Copy Markdown

CLA

[X] I agree that by opening a pull requests I am handing over copyright ownership of my work contained in that pull request to the FileFlows project and the project owner. My contribution will become licensed under the same license as the overall project.

AMD AMF & ROCm (Encode + Compute)

Adds a DockerMod that enables AMD GPU hardware video encode and optional GPU compute on the FileFlows (Ubuntu) image:

  • VA-API (Mesa radeonsi) — the universal AMD encode path on Linux; works on every AMD GPU, including desktop iGPUs.
  • AMF runtime (amf-amdgpu-pro + libamdenc-amdgpu-pro) for the discrete GPUs AMF supports on Linux.
  • Optional ROCm / OpenCL compute (off by default; opt-in via AMD_AMF_PROFILE=standard/opencl) via amdgpu-install --no-dkms.

Built from AMD's official repositories and tooling. Container-safe (never installs a kernel module — --no-dkms), amd64-only, idempotent and self-updating (discovers the newest AMF/driver builds for the image's Ubuntu release, with apt garbage-collection), and a clean --uninstall. Configurable via AMD_AMF_PROFILE (auto/standard/opencl/legacy), plus AMD_GFX_VERSION / AMD_HSA_OVERRIDE / version pins.

Tested on Ubuntu 26.04 inside the FileFlows image via the native DockerMod runner: install, idempotent re-run, and uninstall all clean; hevc_vaapi verified on an AMD iGPU. Ships with a short companion guide (.md).

Installs AMD hardware video encode and optional GPU compute for FileFlows:
- VA-API (Mesa radeonsi) - universal AMD encode path, works on every AMD GPU
- AMF runtime (amf-amdgpu-pro) for the discrete GPUs AMF supports on Linux
- Optional ROCm / OpenCL compute (off by default) via amdgpu-install --no-dkms

Container-safe (no kernel module), amd64-only, idempotent and self-updating
with apt garbage-collection, clean uninstall. Configurable via AMD_AMF_PROFILE
(auto/standard/opencl/legacy).
Copilot AI review requested due to automatic review settings June 1, 2026 17:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new DockerMod to enable AMD GPU hardware encoding (VA-API + AMF runtime) and optional compute (ROCm/OpenCL) inside the FileFlows container, with self-updating and clean uninstall behavior.

Changes:

  • Introduces an install/uninstall Bash mod that detects distro/GPU, installs VA-API + AMF, and optionally installs ROCm/OpenCL via amdgpu-install --no-dkms.
  • Adds a companion Markdown guide documenting profiles, requirements, verification, and troubleshooting.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
DockerMods/AMD AMF & ROCm.sh New DockerMod installer/uninstaller implementing AMD encode + optional compute setup with idempotency and update checks.
DockerMods/AMD AMF & ROCm.md New documentation describing what’s installed, how to configure profiles/env vars, and how to verify/troubleshoot.
Comments suppressed due to low confidence (1)

DockerMods/AMD AMF & ROCm.sh:1

  • The #!/bin/bash shebang is not on the first line of the file. If the mod runner executes this file directly (rather than invoking bash <file>), the OS will not use Bash as the interpreter, which can break execution. Move the shebang to line 1 and keep the metadata/comment header immediately after it.
# ----------------------------------------------------------------------------------------------------

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread DockerMods/AMD AMF &amp; ROCm.sh
Comment thread DockerMods/AMD AMF &amp; ROCm.sh
Comment thread DockerMods/AMD AMF &amp; ROCm.md
…ninstall

- apply_opencl_workaround: set OCL_ICD_VENDORS to the default /etc/OpenCL/vendors
  (all ROCm ICDs are symlinked there) instead of the last-found ICD's directory.
- Profile downgrade (compute -> encode-only): fall back to 'amdgpu-install -y
  --uninstall' when 'amdgpu-uninstall' is unavailable.
@lusoris

lusoris commented Jun 1, 2026

Copy link
Copy Markdown
Author

On the suppressed shebang note (#!/bin/bash not on line 1): this is intentional and matches the existing DockerMod convention in this repo — the # Name:/# Description: metadata header comes first, and the entrypoint runs each mod via bash "$file", so the interpreter is Bash regardless of shebang position. Left as-is for consistency with the other mods.

@revenz

revenz commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

The markdown file might be the best location for this. Most users dont come to this repository directly and use the repository browser in the web console. So I need to think about this, one option maybe to use it how you have it, and update the repository generation to include this markdown if it exists as help for the DockerMod. Ill do some thinking

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants