pipelines icon indicating copy to clipboard operation
pipelines copied to clipboard

Container ghcr.io/open-webui/pipelines:main contains outdated ollama libraries that cause crashing

Open mika-b opened this issue 4 months ago • 0 comments

Latest published (as of Aug 18 2025) container image contains python ollama 0.3.3 which is from Sep 2024 and is not compatible with llama-index-embeddings-ollama 0.8.1.

root@c676fd0dfae3:/app# pip3 list | grep ollama
llama-index-embeddings-ollama            0.8.1
llama-index-llms-ollama                  0.4.2
ollama                                   0.3.3

Image date

docker image inspect ghcr.io/open-webui/pipelines:main |grep image.create
                "org.opencontainers.image.created": "2025-07-09T19:33:06.534Z",

Crashes on container startup

INFO:root:Loaded module: llamaindex_ollama_pipeline
INFO:httpx:HTTP Request: POST http://ollama:11434/api/embed "HTTP/1.1 200 OK"
ERROR:    Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 732, in lifespan
    async with self.lifespan_context(app) as maybe_state:
  File "/usr/local/lib/python3.11/contextlib.py", line 210, in __aenter__
    return await anext(self.gen)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/app/main.py", line 252, in lifespan
    await on_startup()
  File "/app/main.py", line 231, in on_startup
    await module.on_startup()
  File "/app/./pipelines/llamaindex_ollama_pipeline.py", line 55, in on_startup
    self.index = VectorStoreIndex.from_documents(self.documents)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/llama_index/core/indices/base.py", line 122, in from_documents
    return cls(
           ^^^^
  File "/usr/local/lib/python3.11/site-packages/llama_index/core/indices/vector_store/base.py", line 75, in __init__
    super().__init__(
  File "/usr/local/lib/python3.11/site-packages/llama_index/core/indices/base.py", line 79, in __init__
    index_struct = self.build_index_from_nodes(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/llama_index/core/indices/vector_store/base.py", line 309, in build_index_from_nodes
    return self._build_index_from_nodes(content_nodes, **insert_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/llama_index/core/indices/vector_store/base.py", line 278, in _build_index_from_nodes
    self._add_nodes_to_index(
  File "/usr/local/lib/python3.11/site-packages/llama_index/core/indices/vector_store/base.py", line 231, in _add_nodes_to_index
    nodes_batch = self._get_node_with_embedding(nodes_batch, show_progress)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/llama_index/core/indices/vector_store/base.py", line 138, in _get_node_with_embedding
    id_to_embed_map = embed_nodes(
                      ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/llama_index/core/indices/utils.py", line 165, in embed_nodes
    new_embeddings = embed_model.get_text_embedding_batch(
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/llama_index_instrumentation/dispatcher.py", line 317, in wrapper
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/llama_index/core/base/embeddings/base.py", line 473, in get_text_embedding_batch
    embeddings = self._get_text_embeddings(cur_batch)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/llama_index/embeddings/ollama/base.py", line 77, in _get_text_embeddings
    embeddings = self.get_general_text_embedding(text)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/llama_index/embeddings/ollama/base.py", line 93, in get_general_text_embedding
    return result.embeddings[0]
           ^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'embeddings'

Installing requirement: llama-index
Installing requirement: llama-index-llms-ollama
Installing requirement: llama-index-embeddings-ollama
Loaded module: llamaindex_ollama_pipeline
ERROR:    Application startup failed. Exiting.

I had to update llama-index-llms-ollama and ollama to get embedding to work.

root@c676fd0dfae3:/app# pip3 list | grep ollama
llama-index-embeddings-ollama            0.8.1
llama-index-llms-ollama                  0.7.1
ollama                                   0.5.3

mika-b avatar Aug 18 '25 13:08 mika-b