[PR #2127] [MERGED] Combine the 2 Dockerfiles and add ROCm #73084

Closed
opened 2026-05-05 04:44:26 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/2127
Author: @dhiltgen
Created: 1/21/2024
Status: Merged
Merged: 1/21/2024
Merged by: @dhiltgen

Base: mainHead: rocm_container


📝 Commits (1)

  • da72235 Combine the 2 Dockerfiles and add ROCm

📊 Changes

3 files changed (+111 additions, -116 deletions)

View changed files

📝 Dockerfile (+102 -16)
Dockerfile.build (+0 -99)
📝 scripts/build_linux.sh (+9 -1)

📄 Description

This renames Dockerfile.build to replace the old Dockerfile, and adds some new stages to support 2 modes of building - the build_linux.sh script uses intermediate stages to extract the artifacts for ./dist, and the default build generates a container image usable by both cuda and rocm cards. This required transitioning the x86 base to the rocm image to avoid layer bloat.

We should update our Hub landing page with instructions for ROCm. The host needs the ROCm driver.

docker run --privileged --device /dev/kfd ollama/ollama

(Both privileged and the device flag are necessary to access the rocm driver)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/2127 **Author:** [@dhiltgen](https://github.com/dhiltgen) **Created:** 1/21/2024 **Status:** ✅ Merged **Merged:** 1/21/2024 **Merged by:** [@dhiltgen](https://github.com/dhiltgen) **Base:** `main` ← **Head:** `rocm_container` --- ### 📝 Commits (1) - [`da72235`](https://github.com/ollama/ollama/commit/da72235ebf552edc95ad229d1cc12e3c287c43c6) Combine the 2 Dockerfiles and add ROCm ### 📊 Changes **3 files changed** (+111 additions, -116 deletions) <details> <summary>View changed files</summary> 📝 `Dockerfile` (+102 -16) ➖ `Dockerfile.build` (+0 -99) 📝 `scripts/build_linux.sh` (+9 -1) </details> ### 📄 Description This renames Dockerfile.build to replace the old Dockerfile, and adds some new stages to support 2 modes of building - the build_linux.sh script uses intermediate stages to extract the artifacts for ./dist, and the default build generates a container image usable by both cuda and rocm cards. This required transitioning the x86 base to the rocm image to avoid layer bloat. We should update our Hub landing page with instructions for ROCm. The host needs the ROCm driver. ``` docker run --privileged --device /dev/kfd ollama/ollama ``` (Both privileged and the device flag are necessary to access the rocm driver) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-05 04:44:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#73084