- 
                Notifications
    You must be signed in to change notification settings 
- Fork 344
fix: Add support for ollama module #618
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
          
     Merged
      
      
            alexanderankin
  merged 5 commits into
  testcontainers:main
from
bricefotzo:feature/add-ollama
  
      
      
   
  Jun 27, 2024 
      
    
                
     Merged
            
            fix: Add support for ollama module #618
                    alexanderankin
  merged 5 commits into
  testcontainers:main
from
bricefotzo:feature/add-ollama
  
      
      
   
  Jun 27, 2024 
              
            Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    | Codecov ReportAll modified and coverable lines are covered by tests ✅ 
 
 Additional details and impacted files@@           Coverage Diff           @@
##             main     #618   +/-   ##
=======================================
  Coverage        ?   80.29%           
=======================================
  Files           ?       11           
  Lines           ?      604           
  Branches        ?       86           
=======================================
  Hits            ?      485           
  Misses          ?       92           
  Partials        ?       27           ☔ View full report in Codecov by Sentry. | 
              
                    ilopezluna
  
              
              reviewed
              
                  
                    Jun 26, 2024 
                  
              
              
            
            
2d411c2    to
    9d45d4e      
    Compare
  
    - Added a new class OllamaContainer with few methods to handle the Ollama container. - The `_check_and_add_gpu_capabilities` method checks if the host has GPUs and adds the necessary capabilities to the container. - The `commit_to_image` allows to save somehow the state of a container into an image so that we can reuse it, especially for the ones having some models pulled. - Added tests to check the functionality of the new class.
- Added a new class OllamaContainer with few methods to handle the Ollama container. - The `_check_and_add_gpu_capabilities` method checks if the host has GPUs and adds the necessary capabilities to the container. - The `commit_to_image` allows to save somehow the state of a container into an image so that we can reuse it, especially for the ones having some models pulled. - Added tests to check the functionality of the new class.
9d45d4e    to
    5b08529      
    Compare
  
    
    
  alexanderankin 
      pushed a commit
      that referenced
      this pull request
    
      Jun 28, 2024 
    
    
      
  
    
      
    
  
🤖 I have created a release *beep* *boop* --- ## [4.7.0](testcontainers-v4.6.0...testcontainers-v4.7.0) (2024-06-28) ### Features * **core:** Added Generic module ([#612](#612)) ([e575b28](e575b28)) * **core:** allow custom dockerfile path for image build and bypassing build cache ([#615](#615)) ([ead0f79](ead0f79)), closes [#610](#610) * **core:** DockerCompose.stop now stops only services that it starts (does not stop the other services) ([#620](#620)) ([e711800](e711800)) ### Bug Fixes * **ollama:** Add support for ollama module ([#618](#618)) ([5442d05](5442d05)) * **cosmosdb:** Add support for the CosmosDB Emulator ([#579](#579)) ([8045a80](8045a80)) * improve ollama docs, s/ollama_dir/ollama_home/g ([#619](#619)) ([27f2a6b](27f2a6b)) * **kafka:** Add Kraft to Kafka containers ([#611](#611)) ([762d2a2](762d2a2)) ### Documentation * **contributing:** add contribution and new-container guide ([#460](#460)) ([3519f4b](3519f4b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Added a new class OllamaContainer with few methods to handle the Ollama container.
The
_check_and_add_gpu_capabilitiesmethod checks if the host has GPUs and adds the necessary capabilities to the container.The
commit_to_imageallows to save somehow the state of a container into an image so that we can reuse it, especially for the ones having some models pulled.Added tests to check the functionality of the new class.
Fixes #617