Flowise
Flowise copied to clipboard
Unable to run Flowise and Chroma on Docker[BUG]
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
Expected behavior I would expect an answer or donot know
Screenshots
My Docker instance
Flow
If applicable, add exported flow in order to help replicating the problem.
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.
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
Reference: https://github.com/FlowiseAI/Flowise/discussions/286
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
PLeaSE HELP!
this error , i need help
this error , i need help @aghasaadmohammad Remove the last /
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:
- clone chroma repository: git clone https://github.com/chroma-core/chroma.git
- clone flowise repository: git clone https://github.com/FlowiseAI/Flowise.git
- go to docker-compose.yml file in chroma (chroma/docker-compose.yml)
- 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
- NOTE the env_file path. Specify where is the flowise docker env file located
- go to chroma directory: cd chroma
- compose the new updated docker file: docker-compose up -d
- go to flowise: http://localhost:3000/
- 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
- Data upserting and chatting then should work:
