Skip to content

Improve Ollama IT by caching the image with model #121

@eddumelendez

Description

@eddumelendez

Hi,

I have an improvement for OllamaAutoConfigurationIT which can help when working locally. The current issue as described in the test is the model is around 3GB which can take quite a while depending on internet speed.

My approach using the Testcontainers lifecycle:
First test execution

  1. Pull image from registry
  2. Start container
  3. Once the container has started, pull the model
  4. Test execution
  5. When test is finishing, commit the changes in the container and create a local image.
  6. Stop container, stop test

Second test execution

  1. Start container using the local image that already contains the model
  2. Test execution
  3. Stop container, stop test

If there is interest on this, I can provide the PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions