Skip to content

Verba with Docker can't connect to Ollama #375

@venanzi-1852473

Description

@venanzi-1852473

Description

When I run Verba, deployed with docker compose, set up with Ollama, I manage to see the Verba frontend when opening localhost:8000 on my browser, but it gives this error: 0 documents embedded by Couldn't connect to Ollama http://host.docker.internal:11434, and nothing works. I can send queries, but I receive errors, and I can't add any kind of document.

This problem occured when trying to deploy Verba with Docker on three different machines, with CentOS 8, Ubuntu 20.04.5 LTS and Rocky Linux 9.5.
The problem did NOT occur when deploying with Docker, same settings (same docker-compose.yaml), on a Windows 10 machine with WSL.

Installation

  • pip install goldenverba
  • pip install from source
  • Docker installation

If you installed via pip, please specify the version:

Weaviate Deployment

  • Local Deployment
  • Docker Deployment
  • Cloud Deployment

Configuration

I leave this section blank, since I didn't even manage to get to this part. I just tried to use llama3 model.

Reader:
Chunker:
Embedder:
Retriever:
Generator:

Steps to Reproduce

  • Clone the repository with git
  • Start Ollama on the machine with the command ollama serve (checking that Ollama is running, with curl)
  • Set a couple of environment variables in the docker-compose.yaml (explained in Additional context)
  • Run docker compose up -d

Additional context

The variable that I changed in the yaml file is OLLAMA_MODEL=llama3. I also tried with llama3:latest, though, when running it directly from Python (without Verba) setting OLLAMA_MODEL=llama3 in the .env file worked.

I also tried changing OLLAMA_URL=http://host.docker.internal:11434 to OLLAMA_URL=http://localhost:11434; the latter worked when running from Python, but I know that it shouldn't work with Docker (I just tried).
It is worth noting that, when setting OLLAMA_URL=http://localhost:11434, the error message on Verba became 0 documents embedded by Couldn't connect to Ollama http://localhost:11434.

I also tried adding OLLAMA_HOST=0.0.0.0, without success.

This is an image of the error

Image

Note that on the bottom the button says "Reconnecting..." because I closed the docker container instance, is it not related to my problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    investigatingBugs that are still being investigated whether they are valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions