weaviate / Verba

Retrieval Augmented Generation (RAG) chatbot powered by Weaviate
BSD 3-Clause "New" or "Revised" License
6.42k stars 697 forks source link

Docker-compose: container verba starts but API does not work #69

Closed lambdaofgod closed 6 months ago

lambdaofgod commented 1 year ago

I'm trying to run verba using docker-compose, when I run it (I fixed Dockerfile to use Python 3.10 BTW) I get

verba-verba-1     | /usr/local/lib/python3.10/site-packages/PyPDF2/__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead.
verba-verba-1     |   warnings.warn(
verba-verba-1     | INFO:     Will watch for changes in these directories: ['/Verba']
verba-verba-1     | INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
verba-verba-1     | INFO:     Started reloader process [1] using WatchFiles
verba-verba-1     | /usr/local/lib/python3.10/site-packages/PyPDF2/__init__.py:21: DeprecationWarning: PyPDF2 is deprecated. Please move to the pypdf library instead.
verba-verba-1     |   warnings.warn(
verba-verba-1     | /usr/local/lib/python3.10/site-packages/fastapi/openapi/models.py:55: DeprecationWarning: `general_plain_validator_function` is deprecated, use `with_info_plain_validator_function` instead.
verba-verba-1     |   return general_plain_validator_function(cls._validate)
verba-verba-1     | /usr/local/lib/python3.10/site-packages/pydantic_core/core_schema.py:3902: DeprecationWarning: `general_plain_validator_function` is deprecated, use `with_info_plain_validator_function` instead.
verba-verba-1     |   warnings.warn(
verba-verba-1     | INFO:     Started server process [39]
verba-verba-1     | INFO:     Waiting for application startup.
verba-verba-1     | INFO:     Application startup complete.
verba-verba-1     | ⚠ No module named 'torch'
verba-verba-1     | ℹ Setting up client
verba-verba-1     | ℹ No Auth information provided
verba-verba-1     | ✔ Connected to Weaviate
verba-verba-1     | ℹ New Config initialized
verba-verba-1     | ✔ Saved Config
verba-verba-1     | ✔ Set Reader to SimpleReader
verba-verba-1     | ✔ Set Chunker to TokenChunker
verba-verba-1     | ✔ Set Retriever to WindowRetriever
verba-verba-1     | ✔ Saved Config
verba-verba-1     | INFO:     127.0.0.1:45968 - "HEAD / HTTP/1.1" 200 OK
verba-verba-1     | INFO:     127.0.0.1:45976 - "HEAD / HTTP/1.1" 200 OK

In spite of this I can't access verba on localhost:8000. I've waited for couple of minutes. The weaviate seems to work and it returns

{"links":[{"href":"/v1/meta","name":"Meta information about this instance/cluster"},{"documentationHref":"https://weaviate.io/developers/weaviate/api/rest/schema","href":"/v1/schema","name":"view complete schema"},{"documentationHref":"https://weaviate.io/developers/weaviate/api/rest/schema","href":"/v1/schema{/:className}","name":"CRUD schema"},{"documentationHref":"https://weaviate.io/developers/weaviate/api/rest/objects","href":"/v1/objects{/:id}","name":"CRUD objects"},{"documentationHref":"https://weaviate.io/developers/weaviate/api/rest/classification,https://weaviate.io/developers/weaviate/api/rest/classification#knn-classification","href":"/v1/classifications{/:id}","name":"trigger and view status of classifications"},{"documentationHref":"https://weaviate.io/developers/weaviate/api/rest/well-known#liveness","href":"/v1/.well-known/live","name":"check if Weaviate is live (returns 200 on GET when live)"},{"documentationHref":"https://weaviate.io/developers/weaviate/api/rest/well-known#readiness","href":"/v1/.well-known/ready","name":"check if Weaviate is ready (returns 200 on GET when ready)"},{"documentationHref":"https://weaviate.io/developers/weaviate/api/rest/well-known#openid-configuration","href":"/v1/.well-known/openid-configuration","name":"view link to openid configuration (returns 404 on GET if no openid is configured)"}]}
recursionbane commented 1 year ago

I have the same issue.

thomashacker commented 1 year ago

Thanks for the issue! I'll have a look

thomashacker commented 7 months ago

We added some fixes to the Docker setup! Could you try again and see if it works now? 🚀

thomashacker commented 6 months ago

Closing this one! Let me know if the error persists

kjeldahl commented 6 months ago

@thomashacker I have the same problem as described above. I have cloned the project https://github.com/weaviate/Verba/commit/1be4e52e80dc159f72940c5bf9f1e6ed962ba8bc and just run docker compose up

Log output
verba-1     | INFO:     Will watch for changes in these directories: ['/Verba']
verba-1     | INFO:     Uvicorn running on http://localhost:8000 (Press CTRL+C to quit)
verba-1     | INFO:     Started reloader process [1] using WatchFiles
verba-1     | INFO:     Started server process [8]
verba-1     | INFO:     Waiting for application startup.
verba-1     | INFO:     Application startup complete.
verba-1     | ℹ Setting up client
verba-1     | ℹ No Auth information provided
verba-1     | ✔ Connected to Weaviate
verba-1     | ℹ Setting up components
verba-1     | ℹ Retrieve Config From Weaviate
verba-1     | ✔ Config Saved in Weaviate
verba-1     | ℹ Setting READER to BasicReader
verba-1     | ℹ Setting CHUNKER to TokenChunker
verba-1     | ℹ Setting EMBEDDER to ADAEmbedder
verba-1     | ℹ Setting RETRIEVER to WindowRetriever
verba-1     | ℹ Setting GENERATOR to GPT3
verba-1     | INFO:     127.0.0.1:40214 - "HEAD / HTTP/1.1" 200 OK
... repeating ...
thomashacker commented 6 months ago

We added a fix to the Dockerfile! Pull the latest changes and try again. The problem was that verba was not correctly exposed

kjeldahl commented 6 months ago

Thanks a lot. It works after rebuilding the containers.

docker compose down
docker compose build
docker compose up