Fix running Ollama in docker#484
Conversation
…a instructions using Docker
Summary of ChangesHello, 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
🧠 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
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
| cp api/config/embedder.ollama.json.bak api/config/embedder.json | ||
| # overwrite api/config/embedder.json? (y/n [n]) y |
There was a problem hiding this comment.
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.
| 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 |
| "embedder_ollama": { | ||
| "client_class": "OllamaClient", | ||
| "model_kwargs": { | ||
| "model": "nomic-embed-text" | ||
| } | ||
| }, |
There was a problem hiding this comment.
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.
Fix running Ollama in docker. By fixing embedder configuration and Ollama instructions using Docker.
Fixes and closes #483