Skip to content

changed image#3

Open
ArnabChatterjee20k wants to merge 1 commit intomainfrom
feat-dockerfile
Open

changed image#3
ArnabChatterjee20k wants to merge 1 commit intomainfrom
feat-dockerfile

Conversation

@ArnabChatterjee20k
Copy link
Copy Markdown
Member

@ArnabChatterjee20k ArnabChatterjee20k commented Mar 30, 2026

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

Summary by CodeRabbit

  • Chores
    • Updated the container base image to support alternative hardware configurations.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

Walkthrough

The Dockerfile base image was updated from ollama/ollama:0.17.7 to ollama/ollama:rocm. This is a single-line change affecting the container runtime environment and the version of the Ollama distribution used. All other Dockerfile directives, including build steps, model pre-pull logic, environment variables, exposed ports, and entrypoint behavior, remain unchanged.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'changed image' is vague and generic, using non-descriptive language that fails to convey what specific change was made or why it matters. Use a more descriptive title that specifies the actual change, such as 'Update Ollama base image to rocm variant' or 'Switch Dockerfile base image from ollama:0.17.7 to ollama:rocm'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat-dockerfile

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Mar 30, 2026

Greptile Summary

This PR changes the base Docker image from the pinned, multi-backend ollama/ollama:0.17.7 to the floating ollama/ollama:rocm tag, without any explanation in the PR description.

Key concerns:

  • Hardware regression: The rocm tag is exclusively for AMD GPUs using the ROCm framework. The original image supports NVIDIA (CUDA), Apple Silicon (Metal), and CPU-only environments. This change would silently break the image for the vast majority of users.
  • Non-reproducible builds: rocm is a mutable rolling tag that is updated frequently. Builds are no longer deterministic — the image produced today may differ from one built next week, introducing potential silent regressions.
  • No PR description or justification: There is no explanation of what problem this change solves, who it is intended for, or how it was tested.

Confidence Score: 2/5

Not safe to merge — this change breaks GPU/CPU compatibility for all non-AMD users and loses build reproducibility.

Two P1 issues are present: (1) switching to a ROCm-only image is a breaking hardware compatibility regression for NVIDIA and CPU users, and (2) using a floating tag eliminates reproducible builds. The PR also has no description or test plan.

dockerfile — the only changed file requires attention due to the breaking base image switch.

Important Files Changed

Filename Overview
dockerfile Base image changed from pinned ollama/ollama:0.17.7 to floating ollama/ollama:rocm — introduces hardware incompatibility (AMD-only) and non-reproducible builds.

Reviews (1): Last reviewed commit: "changed image" | Re-trigger Greptile

@@ -1,4 +1,4 @@
FROM ollama/ollama:0.17.7
FROM ollama/ollama:rocm
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Breaking change: ROCm image is AMD GPU-only

The ollama/ollama:rocm tag is specifically built for AMD GPUs using the ROCm framework. Switching to this tag means the image will no longer work for users running on NVIDIA GPUs (CUDA) or CPU-only environments — which are far more common deployment targets.

The original ollama/ollama:0.17.7 is a multi-backend image that supports NVIDIA, Apple Silicon (Metal), and CPU inference. Replacing it with the ROCm variant is a significant regression in hardware compatibility.

If AMD GPU support is needed, consider instead using a build argument or a separate Dockerfile variant rather than changing the default image. If the intent truly is AMD-only, this needs to be explicitly documented and communicated to users of this project.

@@ -1,4 +1,4 @@
FROM ollama/ollama:0.17.7
FROM ollama/ollama:rocm
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Floating/mutable tag breaks reproducibility

ollama/ollama:rocm is a rolling, mutable tag that gets updated regularly (Docker Hub shows it was updated just hours ago). This means two builds at different points in time will produce different images, making it impossible to guarantee reproducible builds and potentially introducing silent breaking changes or regressions.

The previous tag 0.17.7 was an immutable, pinned version. If a ROCm-based image is required, it should be pinned to a specific versioned ROCm tag, such as ollama/ollama:0.x.y-rocm (if that format exists upstream), or pinned by digest.

Suggested change
FROM ollama/ollama:rocm
FROM ollama/ollama:0.17.7

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@dockerfile`:
- Line 1: The docker-compose configuration is missing AMD GPU device mappings so
the ollama/ollama:rocm image will fall back to CPU; update the ollama service
(service name "ollama") in docker-compose.yml to add a devices block exposing
/dev/kfd and /dev/dri so ROCm acceleration is available to the container (i.e.,
add a devices: entry listing /dev/kfd and /dev/dri under the ollama service).
- Line 1: Replace the floating image reference in the Dockerfile's FROM
instruction (FROM ollama/ollama:rocm) with a digest-pinned reference (e.g. FROM
ollama/ollama@sha256:e6777885093e) to ensure reproducible builds; update the
FROM line in the Dockerfile to use the `@sha256`:... form, and optionally add a
brief comment noting the pinned digest and supported platform (linux/amd64).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 27edaa33-04c5-4215-906c-2c6f149ca7ef

📥 Commits

Reviewing files that changed from the base of the PR and between 5b9b7cc and 117d6e4.

📒 Files selected for processing (1)
  • dockerfile

@@ -1,4 +1,4 @@
FROM ollama/ollama:0.17.7
FROM ollama/ollama:rocm
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether compose/deployment config exposes AMD ROCm devices.
rg -n -C3 'devices:|/dev/kfd|/dev/dri|device_cgroup_rules|group_add' docker-compose.yml

Repository: appwrite/docker-ollama

Length of output: 48


🏁 Script executed:

#!/bin/bash
# Check if docker-compose files exist and their locations
find . -name "*docker-compose*" -type f 2>/dev/null

Repository: appwrite/docker-ollama

Length of output: 86


🏁 Script executed:

#!/bin/bash
# List files at the repository root to understand structure
ls -la | head -30

Repository: appwrite/docker-ollama

Length of output: 590


🏁 Script executed:

#!/bin/bash
# Check the contents of docker-compose.yml if it exists at root
if [ -f "docker-compose.yml" ]; then
  cat -n docker-compose.yml
fi

Repository: appwrite/docker-ollama

Length of output: 554


Add AMD GPU device configuration to expose ROCm acceleration.

The Dockerfile uses FROM ollama/ollama:rocm but docker-compose.yml does not expose AMD GPU devices (/dev/kfd, /dev/dri). Without this, the container will silently fall back to CPU and cause major performance regressions. Add the following to the ollama service:

    devices:
      - /dev/kfd
      - /dev/dri
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@dockerfile` at line 1, The docker-compose configuration is missing AMD GPU
device mappings so the ollama/ollama:rocm image will fall back to CPU; update
the ollama service (service name "ollama") in docker-compose.yml to add a
devices block exposing /dev/kfd and /dev/dri so ROCm acceleration is available
to the container (i.e., add a devices: entry listing /dev/kfd and /dev/dri under
the ollama service).

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

What is the current immutable digest for ollama/ollama:rocm, and which platforms does that digest support?

💡 Result:

The current immutable digest for ollama/ollama:rocm is sha256:e6777885093e. It supports the linux/amd64 platform exclusively, as indicated by the OS/ARCH listing on Docker Hub tags page for the rocm tag (last pushed 2 days ago, aligning with today's date of 2026-03-30 given recent updates). No other platforms like arm64 are listed for rocm, unlike the latest tag.

Citations:


Pin ollama/ollama:rocm to a digest for reproducible builds.

Using a floating tag makes builds non-deterministic and can introduce unreviewed runtime changes. The current rocm tag resolves to sha256:e6777885093e and supports only linux/amd64.

Suggested change
-FROM ollama/ollama:rocm
+FROM ollama/ollama:rocm@sha256:e6777885093e
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
FROM ollama/ollama:rocm
FROM ollama/ollama:rocm@sha256:e6777885093e
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@dockerfile` at line 1, Replace the floating image reference in the
Dockerfile's FROM instruction (FROM ollama/ollama:rocm) with a digest-pinned
reference (e.g. FROM ollama/ollama@sha256:e6777885093e) to ensure reproducible
builds; update the FROM line in the Dockerfile to use the `@sha256`:... form, and
optionally add a brief comment noting the pinned digest and supported platform
(linux/amd64).

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.

1 participant