Skip to content

Fix running Ollama in docker#484

Merged
sng-asyncfunc merged 1 commit intoAsyncFuncAI:mainfrom
marazik:fix/running-Ollama-in-docker
Mar 5, 2026
Merged

Fix running Ollama in docker#484
sng-asyncfunc merged 1 commit intoAsyncFuncAI:mainfrom
marazik:fix/running-Ollama-in-docker

Conversation

@marazik
Copy link
Contributor

@marazik marazik commented Mar 5, 2026

Fix running Ollama in docker. By fixing embedder configuration and Ollama instructions using Docker.

Fixes and closes #483

@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 and resolves issues encountered when attempting to run Ollama within a Dockerized environment. It streamlines the setup process by correcting the necessary embedder configuration and providing clearer, updated instructions for Docker usage, ultimately ensuring a smoother and functional experience for users.

Highlights

  • Ollama Docker Instructions: The Ollama-instruction.md file has been updated to include a crucial step for configuring the local embedder before building and running the Docker image. This ensures the Ollama setup functions correctly within the Docker environment.
  • Embedder Configuration: The api/config/embedder.ollama.json.bak file was modified to introduce a dedicated embedder_ollama configuration block, specifying OllamaClient as the client class and nomic-embed-text as the default model.

🧠 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
  • Ollama-instruction.md
    • Added a new step to configure the local embedder for Ollama by copying embedder.ollama.json.bak to embedder.json.
    • Re-numbered subsequent steps for building and running the Docker container, and accessing the application.
  • api/config/embedder.ollama.json.bak
    • Introduced a new top-level embedder_ollama object containing client_class set to "OllamaClient" and model_kwargs specifying the "nomic-embed-text" model.
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 fixes running Ollama in Docker by updating the instructions and the embedder configuration. My review focuses on improving the clarity of the instructions and addressing a maintainability issue in the configuration file. I've suggested using a non-interactive command in the documentation to prevent user confusion. Additionally, I've pointed out data duplication in the JSON configuration file which could be problematic for future maintenance.

Comment on lines +85 to +86
cp api/config/embedder.ollama.json.bak api/config/embedder.json
# overwrite api/config/embedder.json? (y/n [n]) y
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The comment simulating an interactive prompt can be confusing for users. Using cp -f makes the command non-interactive and the instruction clearer, which is better for instructions that might be copy-pasted.

Suggested change
cp api/config/embedder.ollama.json.bak api/config/embedder.json
# overwrite api/config/embedder.json? (y/n [n]) y
cp -f api/config/embedder.ollama.json.bak api/config/embedder.json

Comment on lines +2 to +7
"embedder_ollama": {
"client_class": "OllamaClient",
"model_kwargs": {
"model": "nomic-embed-text"
}
},
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This new embedder_ollama configuration is identical to the existing embedder configuration in this file. This duplication can lead to maintenance issues, as changes to the Ollama embedder configuration would need to be made in two places. To improve maintainability, it would be ideal to avoid this duplication.

@sng-asyncfunc sng-asyncfunc merged commit 4c6a1f7 into AsyncFuncAI:main Mar 5, 2026
3 checks passed
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.

Running Ollama in docker fails

2 participants