-
-
Notifications
You must be signed in to change notification settings - Fork 314
feat: Add Ollama module #1099
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Ollama module #1099
Conversation
✅ Deploy Preview for testcontainers-dotnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I had a quick look and added some minor suggestions and improvements.
This commit updates the Ollama configuration to allow more customization options and removes unnecessary test helpers. The OllamaConfiguration class was refactored to provide more configurable parameters such as the VolumePath and VolumeName. Additionally, the TestOutputHelperExtensions and TestOutputLogger classes were deleted as they were not providing any significant value.
@HofmeisterAn I'm updating the branch with my current state as the tests were green on local, but I think it needs another pass. No Rush, I'm busy with my day-job so, no need for you to rush 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution. Testcontainers for Java and Go has recently release a new Ollama module, which allows to detect and enable GPU and allow to commit the container's state and create a new Image. It would be nice to align the .NET implementation along with the others. See java implementation.
Is there any update on this? |
any update on that? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the PR to develop. I'll take a look at it sometime next week and address the necessary parts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the module implementation and aligned it with the other Testcontainers module implementations. I also added a text example.
Thanks for your contribution. Testcontainers for Java and Go has recently release a new Ollama module, which allows to detect and enable GPU and allow to commit the container's state and create a new Image. It would be nice to align the .NET implementation along with the others. See java implementation.
I didn't include detecting and setting the GPU configuration, as it's not that simple in .NET (but it's something we can address in the future). I'm also not sure if committing an image is supported in Docker.DotNet. I need to double-check that. It might be something we need to implement first. If someone wants to pick it up, that would be great, but we need to discuss how to address this in an issue first.
// How to set the device requests using the container builder API:
.WithCreateParameterModifier(parameterModifier =>
parameterModifier.HostConfig.DeviceRequests
= new List<DeviceRequest> { new DeviceRequest { /* TODO: Set properties. */ } })
I also like to reference the |
What does this PR do?
Added a new Module project that uses OLLAMA docker images to give local LLM capabilities. This only supports CPU workload, but adding the env. variables to activate GPU if the prerequisites are there, can be done and so CUDA core based processing isn't precluded
Why is it important?
This module is very powerful and can give a lot of value to those that are incorporating OLLAMA models in their projects
Related issues
Link related issues below. Insert the issue link or reference after the word "Closes" if merging this should automatically close it.
How to test this PR
Run the test added
Follow-ups