docker / genai-stack

Langchain + Docker + Neo4j + Ollama
Creative Commons Zero v1.0 Universal
3.39k stars 703 forks source link

dependency failed to start: container genai-stack-api-1 is unhealthy #142

Open hsiehgeoVA opened 3 months ago

hsiehgeoVA commented 3 months ago

First ran into /data problem. Followed the thread #134 and implemented three changes: (a) chown /home/casev/../genai-stack/data directory to casev for userID and groupID. (2) added to /home/casev/.profile two statements: export USER_ID=$(id -u) and export GROUP_ID=$(id -g). (3) modified docker-compose.yml to set database: user: ${USER_ID}:${GROUP_ID}. Next, run docker compose --profile linux up again. This time, the /data file error did not appear, and installation went further. However, it still stopped with an error message: dependency failed to start: container genai-stack-api-1 is unhealthy. Even after shutdown and restart, docker compose seemed to be stuck for hours displaying with different port numbers: INFO: 127.0.0.1:xxxxxx - "GET / HTTP/1.1" 200 OK with different port numbers.

hsiehgeoVA commented 3 months ago

Tried again and again. Finally the installation seemed to be OK even with the INFO messages which would stop after perhaps 30+. Now I use nohup docker compose ... & to run it. Can get most of the demo apps working, except the support agent bot: able to get the web page. However, it only showed the section for Select RAG mode. Do not see a textbox for entering a prompt.

HakunanMatatat commented 2 months ago

I have installed genai stack many times but it has failed.

The error situation is as follows:

dependency failed to start: container genai-stack-database-1 exited (1)

dependency failed to start: container genai-stack-api-1 is unhealthy

api-1 | requests.exceptions.ConnectionError: (MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/models/sentence-transformers/all-MiniLM-L6-v2 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7ab84cd55f90>: Failed to establish a new connection: [Errno 101] Network is unreachable'))"), '(Request ID: a385a3c1-472c-4be7-991c-f1d9f11e2d95)') dependency failed to start: container genai-stack-api-1 exited (1)

api-1 | File "/usr/local/lib/python3.11/site-packages/urllib3/connection.py", line 218, in newconn api-1 | raise NewConnectionError( api-1 | urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7ab84cd55f90>: Failed to establish a new connection: [Errno 101] Network is unreachable

How should we solve it?

HakunanMatatat commented 2 months ago

I am using a personal desktop computer and Clash, 127.0.0.1:7890 The attachment is my. env and yml configuration files 1) Docker run it rm gpus all ubuntu nvidia smi Display successful installation. 2) Git clone https://github.com/docker/genai-stack CD genai stack 3) Docker compose -- profile linux-gpu up env.txt docker-compose.yml.txt

HakunanMatatat commented 2 months ago

image There are some error messages above.

This is opening http://localhost:8501/ Screenshot 2024-04-16 191225

The display shows that Python 3.11 was not found locally (only Python 3.10 was found locally), and it was not found in the Docker also.

I don't know where all the Python packages installed in the requirements.

pwrose commented 6 days ago

I'm also getting an "dependency failed to start: container genai-stack-api-1 is unhealthy" error on Mac M1 Max:

api-1         | /usr/local/lib/python3.11/site-packages/langchain_core/_api/deprecation.py:139: LangChainDeprecationWarning: The class `HuggingFaceEmbeddings` was deprecated in LangChain 0.2.2 and will be removed in 0.3.0. An updated version of the class exists in the langchain-huggingface package and should be used instead. To use it run `pip install -U langchain-huggingface` and import as `from langchain_huggingface import HuggingFaceEmbeddings`.
api-1         |   warn_deprecated(
Gracefully stopping... (press Ctrl+C again to force)
dependency failed to start: container genai-stack-api-1 is unhealthy