Unable to deploy Verba v1.0.3 and v2.0.0 with Docker on Windows

Description

I tried to use Verba v1.0.3 and v2.0.0 with Docker on Windows.
I followed the instructions from GitHub

Both v1.0.3 and v.2.0.0 always produce an error. Verba v1.0.0 works fine.

This is the content of my .env file that i copy into the goldenverba dir:

OLLAMA_URL=http://localhost:11434
OLLAMA_MODEL=llama3
OLLAMA_EMBED_MODEL=nomic-embed-text:latest

Docker compose always successfully executes and creates the containers.
Verba v1.0.3 always produces the following error:

2024-09-10 15:56:16 INFO:     Will watch for changes in these directories: ['/Verba']
2024-09-10 15:56:16 INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
2024-09-10 15:56:16 INFO:     Started reloader process [1] using WatchFiles
2024-09-10 15:56:17 /usr/local/lib/python3.11/site-packages/pypdf/_crypt_providers/_cryptography.py:32: CryptographyDeprecationWarning: ARC4 has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.ARC4 and will be removed from this module in 48.0.0.
2024-09-10 15:56:17   from cryptography.hazmat.primitives.ciphers.algorithms import AES, ARC4
2024-09-10 15:56:17 Process SpawnProcess-1:
2024-09-10 15:56:17 Traceback (most recent call last):
2024-09-10 15:56:17   File "/usr/local/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
2024-09-10 15:56:17     self.run()
2024-09-10 15:56:17   File "/usr/local/lib/python3.11/multiprocessing/process.py", line 108, in run
2024-09-10 15:56:17     self._target(*self._args, **self._kwargs)
2024-09-10 15:56:17   File "/usr/local/lib/python3.11/site-packages/uvicorn/_subprocess.py", line 78, in subprocess_started
2024-09-10 15:56:17     target(sockets=sockets)
2024-09-10 15:56:17   File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 65, in run
2024-09-10 15:56:17     return asyncio.run(self.serve(sockets=sockets))
2024-09-10 15:56:17            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-10 15:56:17   File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
2024-09-10 15:56:17     return runner.run(main)
2024-09-10 15:56:17            ^^^^^^^^^^^^^^^^
2024-09-10 15:56:17   File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
2024-09-10 15:56:17     return self._loop.run_until_complete(task)
2024-09-10 15:56:17            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-10 15:56:17   File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
2024-09-10 15:56:17   File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 69, in serve
2024-09-10 15:56:17     await self._serve(sockets)
2024-09-10 15:56:17   File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 76, in _serve
2024-09-10 15:56:17     config.load()
2024-09-10 15:56:17   File "/usr/local/lib/python3.11/site-packages/uvicorn/config.py", line 433, in load
2024-09-10 15:56:17     self.loaded_app = import_from_string(self.app)
2024-09-10 15:56:17                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-10 15:56:17   File "/usr/local/lib/python3.11/site-packages/uvicorn/importer.py", line 22, in import_from_string
2024-09-10 15:56:17     raise exc from None
2024-09-10 15:56:17   File "/usr/local/lib/python3.11/site-packages/uvicorn/importer.py", line 19, in import_from_string
2024-09-10 15:56:17     module = importlib.import_module(module_str)
2024-09-10 15:56:17              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-10 15:56:17   File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
2024-09-10 15:56:17     return _bootstrap._gcd_import(name[level:], package, level)
2024-09-10 15:56:17            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-10 15:56:17   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
2024-09-10 15:56:17   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
2024-09-10 15:56:17   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
2024-09-10 15:56:17   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
2024-09-10 15:56:17   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
2024-09-10 15:56:17   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
2024-09-10 15:56:17   File "/Verba/goldenverba/server/api.py", line 14, in <module>
2024-09-10 15:56:17     from goldenverba import verba_manager
2024-09-10 15:56:17   File "/Verba/goldenverba/verba_manager.py", line 23, in <module>
2024-09-10 15:56:17     from goldenverba.components.managers import (
2024-09-10 15:56:17   File "/Verba/goldenverba/components/managers.py", line 17, in <module>
2024-09-10 15:56:17     from goldenverba.components.reader.GitLabReader import GitLabReader
2024-09-10 15:56:17 ModuleNotFoundError: No module named 'goldenverba.components.reader.GitLabReader'
2024-09-10 15:56:17 sys:1: ResourceWarning: unclosed file <_io.TextIOWrapper name=0 mode='r' encoding='UTF-8'>

Verba v2.0.0 always produces this error:

2024-09-10 16:11:43 /usr/local/lib/python3.11/site-packages/google/protobuf/runtime_version.py:112: UserWarning: Protobuf gencode version 5.27.2 is older than the runtime version 5.28.0 at grpc_health/v1/health.proto. Please avoid checked-in Protobuf gencode that can be obsolete.
2024-09-10 16:11:43   warnings.warn(
2024-09-10 16:11:49 Traceback (most recent call last):
2024-09-10 16:11:49   File "/usr/local/bin/verba", line 33, in <module>
2024-09-10 16:11:49     sys.exit(load_entry_point('goldenverba', 'console_scripts', 'verba')())
2024-09-10 16:11:49              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-10 16:11:49   File "/usr/local/bin/verba", line 25, in importlib_load_entry_point
2024-09-10 16:11:49     return next(matches).load()
2024-09-10 16:11:49            ^^^^^^^^^^^^^^^^^^^^
2024-09-10 16:11:49   File "/usr/local/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
2024-09-10 16:11:49     module = import_module(match.group('module'))
2024-09-10 16:11:49              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-10 16:11:49   File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
2024-09-10 16:11:49     return _bootstrap._gcd_import(name[level:], package, level)
2024-09-10 16:11:49            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-10 16:11:49   File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
2024-09-10 16:11:49   File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
2024-09-10 16:11:49   File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
2024-09-10 16:11:49   File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
2024-09-10 16:11:49   File "<frozen importlib._bootstrap_external>", line 940, in exec_module
2024-09-10 16:11:49   File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
2024-09-10 16:11:49   File "/Verba/goldenverba/server/cli.py", line 6, in <module>
2024-09-10 16:11:49     from goldenverba import verba_manager
2024-09-10 16:11:49   File "/Verba/goldenverba/verba_manager.py", line 24, in <module>
2024-09-10 16:11:49     from goldenverba.components.managers import (
2024-09-10 16:11:49   File "/Verba/goldenverba/components/managers.py", line 98, in <module>
2024-09-10 16:11:49     CohereEmbedder(),
2024-09-10 16:11:49     ^^^^^^^^^^^^^^^^
2024-09-10 16:11:49   File "/Verba/goldenverba/components/embedding/CohereEmbedder.py", line 27, in __init__
2024-09-10 16:11:49     value=models[0],
2024-09-10 16:11:49           ~~~~~~^^^
2024-09-10 16:11:49 TypeError: 'NoneType' object is not subscriptable

hi @Kugelhaufen !!

Welcome to our community :hugs:

For version v2 it looks like there are no models configured/available.

are those env vars the same one you are using on Verba 2.0?

I tried everything with different .env files, including a completely empty one or no .env file at all. I always get the same error on both versions. I donโ€™t think it has to do with the .env file.

Can you define this env variables with a working cohere api key?

COHERE_API_KEY

For some reason, your deployment is trying to get cohere models, and is failing.

Ok Verba v2 worked after defining a cohere and an OpenAI API key.

But as far as I know it is supposed to work without these keys in the .env file as well, right?

definitely.

I am not sure why the Cohere embedded kick in.

Maybe some env vars are set.

There are more changes coming to Verba that will improve this deployment part.

Thanks!

Hello ,

I am running ollama on wsl2 and weaviate&Verba on docker.

I had the same error. i solved it by using the ununtu/wsl2 ip
OLLAMA_URL was the issue

Verba:
image: verba-verba
ports:
- 8000:8000
environment:
WEAVIATE_URL_VERBA:
OLLAMA_URL: โ€˜http://112.28.24.23:11434โ€™ # Depending on your Docker environment (localhost or internal)
volumes:
- ./data:/data/

volumes:
weaviate_data:

hi @doc97040 !!

Welcome to our community and thanks for sharing!

while using docker, itโ€™s best to use http://host.docker.internal:11434 instead of a fixed ip as it may change.

host.docker.internal will always point to your host, where ollama should be running locally.

Indeed, ubuntu/wsl2 can make things hard, as there are some additional layers in between the components, when compared to linux or mac.