Skip to content

fix: Updating/fixing ollama url, now with zst compression#481

Open
marazik wants to merge 2 commits intoAsyncFuncAI:mainfrom
marazik:fix/fixing-ollama-url
Open

fix: Updating/fixing ollama url, now with zst compression#481
marazik wants to merge 2 commits intoAsyncFuncAI:mainfrom
marazik:fix/fixing-ollama-url

Conversation

@marazik
Copy link

@marazik marazik commented Mar 3, 2026

This PR fixes the issue of Ollama url is broken, resulting that the docker build fails to create an image.

Fixes and closes #480

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical build failure in the Docker image creation process by rectifying an outdated Ollama download URL. It also modernizes the download mechanism by adopting zst compression, which is more efficient and aligns with the current distribution method for Ollama, ensuring robust and successful image builds.

Highlights

  • Ollama Download Fix: Resolved an issue where the Ollama download URL was broken, causing Docker image build failures.
  • Zstd Compression Integration: Switched the Ollama download process to use .tar.zst archives, improving efficiency and ensuring compatibility with the updated download source.
  • Dockerfile Dependency Update: Added the zstd package to the Dockerfile-ollama-local to support the new compression format.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • Dockerfile-ollama-local
    • Installed the zstd package to enable decompression of .zst archives.
    • Modified the Ollama download command to fetch the .tar.zst archive and decompress it using zstd.
    • Updated the Ollama download URL to the correct .tar.zst endpoint.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the Dockerfile for the local Ollama setup to use a new download URL and handle .zst compressed archives. The changes correctly address the broken URL issue. I've provided two suggestions for improvement: one to make the download and extraction process more robust against failures, and another to optimize the Docker image size by cleaning up the apt cache. These are both best practices for writing Dockerfiles.

Comment on lines +44 to +45
curl -L "https://ollama.com/download/ollama-linux-${OLLAMA_ARCH}.tar.zst" \
| zstd -d | tar -x -C /usr
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The pipeline curl | zstd | tar can fail silently if an intermediate command fails. For example, if curl encounters an HTTP error (like a 404), the build step might still succeed incorrectly. To make the build more robust, use set -o pipefail to ensure the pipeline fails if any command within it fails. Additionally, adding the -f flag to curl will make it exit with an error on server errors.

    (set -o pipefail; curl -fL "https://ollama.com/download/ollama-linux-${OLLAMA_ARCH}.tar.zst" | zstd -d | tar -x -C /usr)

FROM python:3.11-slim AS ollama_base
RUN apt-get update && apt-get install -y \
curl
curl zstd
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

To reduce Docker image size, it's a best practice to clean up the apt cache within the same RUN layer where packages are installed. You can also use --no-install-recommends to avoid installing unnecessary packages. The RUN command starting on line 28 should be updated to include these optimizations. For example: RUN apt-get update && apt-get install -y --no-install-recommends curl zstd && rm -rf /var/lib/apt/lists/*

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.

Error - ollama url is broken

1 participant