Skip to content

devops : Add main-rocm Dockerfile - #3975

Merged
danbev merged 1 commit into
ggml-org:masterfrom
berney:f-docker-main-rocm
Aug 24, 2026
Merged

danbev merged 1 commit into
ggml-org:masterfrom
berney:f-docker-main-rocm

Conversation

@berney

@berney berney commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Adds a Dockerfile for a ROCm build.
Based off code from https://github.com/kyuz0/amd-strix-halo-toolboxes/blob/main/toolboxes/Dockerfile.rocm-7.14.

The build and runtime targets:

GFX target AMD GPU architecture Devices
gfx1100 RDNA 3 dGPU Radeon RX 7900 XTX, RX 7900 XT, RX 7900 GRE; Radeon PRO W7900, W7800
gfx1101 RDNA 3 dGPU Radeon RX 7800 XT, RX 7700 XT; Radeon PRO W7700
gfx1102 RDNA 3 dGPU Radeon RX 7600 XT, RX 7600
gfx1103 RDNA 3 iGPU Radeon 780M and related RDNA 3 integrated GPUs
gfx1150 RDNA 3.5 APU Ryzen AI 300-series / Strix Point APUs, including Radeon 890M-class graphics
gfx1151 RDNA 3.5 APU Ryzen AI Max/Max+ and PRO 300-series / Strix Halo APUs, including Ryzen AI Max+ PRO 395 and Radeon 8060S
gfx1152 RDNA 3.5 APU Certain newer Ryzen AI APUs, including Radeon 860M-class graphics
gfx1200 RDNA 4 dGPU Radeon RX 9060 XT and RX 9060
gfx1201 RDNA 4 dGPU Radeon RX 9070 XT, RX 9070 and RX 9070 GRE

This pull request introduces a new multi-stage Dockerfile, .devops/main-rocm.Dockerfile, to support building and running the project with AMD ROCm 7.14 for GPU acceleration. The Dockerfile is split into build and runtime stages, ensuring a clean and efficient image for deployment.

ROCm Dockerfile addition:

  • Added .devops/main-rocm.Dockerfile with a build stage based on Fedora 44, installing ROCm 7.14 development packages and compiling the project with HIP and AMDGPU targets enabled.
  • Added a runtime stage based on Fedora Minimal 44, installing only the necessary ROCm runtime and BLAS packages for supported GPU architectures, and copying the built application from the build stage.
  • Configured environment variables (ROCM_PATH, HIP_PATH, PATH, LD_LIBRARY_PATH) for ROCm compatibility in both build and runtime stages.
  • Created symbolic links in /opt/rocm to ensure compatibility with ROCm tools and libraries.
  • Set the entrypoint to run the application in a Bash shell.

Testing

  • Tested on a gfx1151 this works.

In my testing I did notice a transcription difference between running main-vulkan-306c88f4d1286aec1bf96e544632897886af5501 v.1.9.2 docker image and main-rocm. Multiple runs would provide consistent output, but the output of vulkan and rocm differed - I'm not sure why. For the most part it was little differences, where I feel ROCm was more accurate, but there was a chunk near the end that ROCm skipped that Vulkan did not. My testing was with -m ggml-large-v3-turbo-q5_0.bin and --vad --vad-model ggml-silero-v6.2.0.bin

Example small difference - first vulkan (less accurate) then ROCm (more accurate):

192c178,179
<  of the moment, and most importantly, be grateful.
---
>  Honor the moment.
>  And most importantly, be grateful.

The VAD segments are the same in both Vulkan and ROCm.

@danbev danbev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I tried this locally and it worked for me 👍

@danbev
danbev merged commit 2569409 into ggml-org:master Aug 24, 2026
40 checks passed
@berney
berney deleted the f-docker-main-rocm branch August 29, 2026 13:16
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.

2 participants