Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

Unable to run Flowise and Chroma on Docker[BUG]

Open Ramanpreet56 opened this issue 2 years ago • 6 comments

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

  • Installation [e.g. docker`]
  • Flowise Version [latest]
  • OS: [Ubuntu WSL]
  • Browser [e.g. chrome, edge]

Additional context Add any other context about the problem here.

Ramanpreet56 avatar Aug 21 '23 09:08 Ramanpreet56

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

chungyau97 avatar Aug 25 '23 15:08 chungyau97

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 avatar Oct 10 '23 11:10 Initonedeb

PLeaSE HELP!

Initonedeb avatar Oct 10 '23 11:10 Initonedeb

image

this error , i need help

aghasaadmohammad avatar Oct 12 '23 12:10 aghasaadmohammad

image

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

wenwenc9 avatar Nov 21 '23 07:11 wenwenc9

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: - ../Flowise/docker/.env ports: - "${FLOWISE_PORT:-3000}:3000" volumes: - ~/.flowise:/root/.flowise command: /bin/sh -c "sleep 3; flowise start" networks: - net

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

justas145 avatar Jan 17 '24 09:01 justas145