FlowiseAI / Flowise

Drag & drop UI to build your customized LLM flow
https://flowiseai.com
Apache License 2.0
32.05k stars 16.72k forks source link

Unable to run Flowise and Chroma on Docker[BUG] #810

Closed Ramanpreet56 closed 8 months ago

Ramanpreet56 commented 1 year ago

Describe the bug Hi I just followed the guide mentioned to run flowise and chroma on docker. Modified my docker-compose.yml for chroma as requested but still encountering this error

Error: Chroma getOrCreateCollection error: Error: TypeError: fetch failed

To Reproduce Steps to reproduce the behavior:

I updated docker compose of Chroma to include the flowise env file and flowise reference and then ran the build up command.

This is my flow

image

Expected behavior I would expect an answer or donot know

Screenshots My Docker instance

image

Flow If applicable, add exported flow in order to help replicating the problem.

image

Setup

Additional context Add any other context about the problem here.

chungyau97 commented 1 year ago

Hi @Ramanpreet56,

Try to follow this guide https://docs.flowiseai.com/vector-stores/chroma#additional

My Test: docker\docker-compose.yml

version: '3.1'

services:
    flowise:
        image: flowiseai/flowise
        restart: always
        environment:
            - PORT=${PORT}
            - PASSPHRASE=${PASSPHRASE}
            - FLOWISE_USERNAME=${FLOWISE_USERNAME}
            - FLOWISE_PASSWORD=${FLOWISE_PASSWORD}
            - DEBUG=${DEBUG}
            - DATABASE_PATH=${DATABASE_PATH}
            - APIKEY_PATH=${APIKEY_PATH}
            - SECRETKEY_PATH=${SECRETKEY_PATH}
            - LOG_LEVEL=${LOG_LEVEL}
            - LOG_PATH=${LOG_PATH}
        ports:
            - '${PORT}:${PORT}'
        volumes:
            - ~/.flowise:/root/.flowise
        networks:
            - flowise_net
        command: /bin/sh -c "sleep 3; flowise start"

networks:
    flowise_net:
        name: chroma_net
        external: true

image image

Reference: https://github.com/FlowiseAI/Flowise/discussions/286

Initonedeb commented 1 year ago

HI i´m running everything in a windows machine, using Faiss works ok, but on chromadb upsert usage i get Chroma getOrCreateCollection error: Error: TypeError: fetch failed Error: Chroma getOrCreateCollection error: Error: TypeError: fetch failed 2023-10-10 081527

Initonedeb commented 1 year ago

PLeaSE HELP!

aghasaadmohammad commented 1 year ago

image

this error , i need help

wenwenc9 commented 1 year ago

image

this error , i need help @aghasaadmohammad Remove the last / image

justas145 commented 10 months ago

Hi, I was running into same issues and tried many methods. The main issue is that chroma container and flowise container are not on the same network. Here is a step by step detailed guide how to make chroma run in flowise:

  1. clone chroma repository: git clone https://github.com/chroma-core/chroma.git
  2. clone flowise repository: git clone https://github.com/FlowiseAI/Flowise.git
  3. go to docker-compose.yml file in chroma (chroma/docker-compose.yml)
  4. Replace everything in docker-compose.yml file with this:

version: "3.9"

networks: net: driver: bridge

services: server: image: server build: context: . dockerfile: Dockerfile volumes:

Be aware that indexed data are located in "/chroma/chroma/"

  # Default configuration for persist_directory in chromadb/config.py
  # Read more about deployments: https://docs.trychroma.com/deployment
  - chroma-data:/chroma/chroma
command: uvicorn chromadb.app:app --reload --workers 1 --host 0.0.0.0 --port 8000 --log-config chromadb/log_config.yml --timeout-keep-alive 30
environment:
  - IS_PERSISTENT=TRUE
  - CHROMA_SERVER_AUTH_PROVIDER=${CHROMA_SERVER_AUTH_PROVIDER}
  - CHROMA_SERVER_AUTH_CREDENTIALS_FILE=${CHROMA_SERVER_AUTH_CREDENTIALS_FILE}
  - CHROMA_SERVER_AUTH_CREDENTIALS=${CHROMA_SERVER_AUTH_CREDENTIALS}
  - CHROMA_SERVER_AUTH_CREDENTIALS_PROVIDER=${CHROMA_SERVER_AUTH_CREDENTIALS_PROVIDER}
  - PERSIST_DIRECTORY=${PERSIST_DIRECTORY:-/chroma/chroma}
  - CHROMA_OTEL_EXPORTER_ENDPOINT=${CHROMA_OTEL_EXPORTER_ENDPOINT}
  - CHROMA_OTEL_EXPORTER_HEADERS=${CHROMA_OTEL_EXPORTER_HEADERS}
  - CHROMA_OTEL_SERVICE_NAME=${CHROMA_OTEL_SERVICE_NAME}
  - CHROMA_OTEL_GRANULARITY=${CHROMA_OTEL_GRANULARITY}
  - CHROMA_SERVER_NOFILE=${CHROMA_SERVER_NOFILE}
ports:
  - 8000:8000
networks:
  - net

flowise: platform: linux/x86_64 image: flowiseai/flowise restart: always env_file:

volumes: chroma-data: driver: local

  1. NOTE the env_file path. Specify where is the flowise docker env file located
  2. go to chroma directory: cd chroma
  3. compose the new updated docker file: docker-compose up -d
  4. go to flowise: http://localhost:3000/
  5. For the chroma block it is very important you specify correct URL. How to know chroma correct url? 9.1 check what is chroma docker container id. Type: docker containe ls. 9.2 Then type: docker inspect -f '{{json .NetworkSettings.Networks}}' CHROMA-CONTAINER-ID 9.3 Look for "IPAddress:""HERE_IS_THE_CHROMA_URL" 9.4 In flowise, chroma url would be: http://HERE_IS_THE_CHROMA_URL:DOCKER_CONTAINER_PORT image
  6. Data upserting and chatting then should work: image image