Upload 3 files
Browse filesFiles changed (3)
- Dockerfile+65-57
- README.md+64-48
- flowise.json+12-12
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657# ---------- Base image -----------------------------------------------------FROM node:18-slim# ---------- OS packages ----------------------------------------------------RUN apt-get update && apt-get install -y \git python3 python3-pip build-essential \libcairo2-dev libpango1.0-dev chromium curl \&& apt-get clean && rm -rf /var/lib/apt/lists/*# ---------- Environment ----------------------------------------------------ENV PUPPETEER_SKIP_DOWNLOAD=true \PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium \CHROMA_SERVER_CORS_ALLOW_ORIGINS='["*"]' \PORT=7860 \FLOWISE_USERNAME=admin \FLOWISE_PASSWORD=admin \DATABASE_PATH=/data/.flowise \LOG_PATH=/data/.flowise/logs \TEMP_UPLOAD_DIR=/data/uploads \CHROMA_URL=http://localhost:8000# ---------- Node & Python deps --------------------------------------------RUN npm install -g flowise@3.0.0# Chroma server 1.x (compatible with Flowise v2 API)RUN pip3 install numpy==1.26.4 --break-system-packages \&& pip3 install chromadb==1.0.9 --break-system-packages # provides `chroma` CLI v2# ---------- Prevent Flowise early-log crash -------------------------------RUN mkdir -p /usr/local/lib/node_modules/flowise/logs \&& chmod -R 777 /usr/local/lib/node_modules/flowise# ---------- Persistent data directories -----------------------------------WORKDIR /dataRUN mkdir -p /data/.flowise/logs /data/.flowise/storage /data/uploads /data/chroma \&& chmod -R 777 /data \&& chown -R 1000:1000 /dataENV PATH=$PATH:/home/node/.local/bin:/usr/local/bin:/root/.local/binUSER 1000:1000# ---------- Expose ports ---------------------------------------------------EXPOSE 7860 8000# ---------- Start: Chroma β wait β Flowise ---------------------------------CMD sh -c 'set -x; \chroma run \--path /data/chroma \--host 0.0.0.0 \--port 8000 \& \echo "--- Waiting for Chroma API ---"; \while ! curl -v http://localhost:8000/api/v2/heartbeat; do \echo "[DEBUG] Chroma not ready yet. Retrying..."; \netstat -tulnp || ss -tulnp || true; \sleep 1; \done; \echo "--- Chroma API is up ---"; \echo "[DEBUG] Testing Chroma collections endpoint:"; \curl -v http://localhost:8000/api/v2/collections || true; \echo "[DEBUG] Environment variables:"; \printenv | grep CHROMA || true; \echo "[DEBUG] Process list:"; \ps aux; \echo "[DEBUG] Flowise will start now."; \npx flowise start'1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465# ---------- Base image -----------------------------------------------------FROM node:18-slim# ---------- OS packages ----------------------------------------------------RUN apt-get update && apt-get install -y \git python3 python3-pip build-essential \libcairo2-dev libpango1.0-dev chromium curl \&& apt-get clean && rm -rf /var/lib/apt/lists/*# ---------- Environment ----------------------------------------------------ENV PUPPETEER_SKIP_DOWNLOAD=true \PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium \CHROMA_SERVER_CORS_ALLOW_ORIGINS='["*"]' \PORT=7860 \FLOWISE_USERNAME=admin \FLOWISE_PASSWORD=admin \DATABASE_PATH=/data/.flowise \LOG_PATH=/data/.flowise/logs \TEMP_UPLOAD_DIR=/data/uploads \CHROMA_URL=http://localhost:8000# ---------- Node & Python deps --------------------------------------------RUN npm install -g flowise@3.0.0# Chroma server 1.x (compatible with Flowise v2 API)RUN pip3 install numpy==1.26.4 --break-system-packages \&& pip3 install chromadb==1.0.9 --break-system-packages # provides `chroma` CLI v2# ---------- Prevent Flowise early-log crash -------------------------------RUN mkdir -p /usr/local/lib/node_modules/flowise/logs \&& chmod -R 777 /usr/local/lib/node_modules/flowise# ---------- Persistent data directories -----------------------------------WORKDIR /dataRUN mkdir -p /data/.flowise/logs /data/.flowise/storage /data/uploads /data/chroma \&& chmod -R 777 /data \&& chown -R 1000:1000 /dataENV PATH=$PATH:/home/node/.local/bin:/usr/local/bin:/root/.local/binUSER 1000:1000# ---------- Expose ports ---------------------------------------------------EXPOSE 7860 8000# ---------- Start: Chroma β wait β Flowise ---------------------------------CMD sh -c 'set -x; \chroma run \--path /data/chroma \--host 0.0.0.0 \--port 8000 \& \echo "--- Waiting for Chroma API ---"; \while ! curl -v http://localhost:8000/api/v2/heartbeat; do \echo "[DEBUG] Chroma not ready yet. Retrying..."; \netstat -tulnp || ss -tulnp || true; \sleep 1; \done; \echo "--- Chroma API is up ---"; \echo "[DEBUG] Testing Chroma collections endpoint:"; \curl -v http://localhost:8000/api/v2/collections || true; \echo "[DEBUG] Environment variables:"; \printenv | grep CHROMA || true; \echo "[DEBUG] Process list:"; \ps aux; \echo "[DEBUG] Flowise will start now."; \npx flowise start'
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748---title: Flowiseemoji: πcolorFrom: graycolorTo: greensdk: dockerpinned: false---## πΎ Flowise on Hugging Face Spaces (with Chroma Persistence)This Space uses **Flowise with local Chroma DB and SQLite** to store your documents andchat history.> Once the container is running, access Flowise via the **App** tab above.### π What gets saved?- **Uploaded documents and embeddings** β `/data/chroma`- **Chat history and upsert logs** β `/data/flowise.db`- **Configuration file** β `flowise.json`These are stored in a special folder called `/data` which survives restarts but **not**rebuilds.---## β οΈ Do Not Edit or Rebuild- Any code or README change deletes all your data.- Do **not** commit changes once youβve started using the Space.- If you accidentally rebuild, all documents and work are lost.- Rebuilds may also occur if Hugging Face updates backend infrastructure. Back up your dataregularly.---## π§± How to Back Up Your Work### β Recommended Method: Export from Flowise UI1. Open Flowise via the **App** tab.2. Click the purple gear icon (top right) in your flow.3. Choose **Export** to download the `.json` file to your device.4. Unfortunately, for full data backups, you need to use a paid Hugging Face plan and mountexternal storage.> Note: Runtime files (like `/data`) are not visible or downloadable from the Files tab infree-tier Docker Spaces.---## π‘ Tip for Teams- Back up your data **as soon as your bot is working**- Re-upload documents only if necessary β rebuilding means starting over---## π Version Info- This setup uses **Flowise version 3.0.0**- Compatibility may vary with later versions---## βΉοΈ ReferenceFlowise Docs: https://docs.flowiseai.com/Hugging Face Space Settings: https://huggingface.co/docs/hub/spaces12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364---title: Flowiseemoji: πcolorFrom: graycolorTo: greensdk: dockerpinned: false---## πΎ Flowise on Hugging Face Spaces (with Chroma Persistence)This Space uses **Flowise with local Chroma DB and SQLite** to store your documents and chat history.> Once the container is running, access Flowise via the **App** tab above.### π What gets saved?- **Uploaded documents and embeddings** β `/data/chroma`- **Chat history and upsert logs** β `/data/flowise.db`- **Configuration file** β `flowise.json`These are stored in a special folder called `/data` which survives restarts but **not** rebuilds.---## β οΈ Do Not Edit or Rebuild- Any code or README change deletes all your data.- Do **not** commit changes once youβve started using the Space.- If you accidentally rebuild, all documents and work are lost.- Rebuilds may also occur if Hugging Face updates backend infrastructure. Back up your data regularly.---## π§± How to Back Up Your Work### β Recommended Method: Export from Flowise UI1. Open Flowise via the **App** tab.2. Click the purple gear icon (top right) in your flow.3. Choose **Export** to download the `.json` file to your device.4. Unfortunately, for full data backups, you need to use a paid Hugging Face plan and mount external storage.> Note: Runtime files (like `/data`) are not visible or downloadable from the Files tab in free-tier Docker Spaces.---## π‘ Tip for Teams- Back up your data **as soon as your bot is working**- Re-upload documents only if necessary β rebuilding means starting over---## π Version Info- This setup uses **Flowise version 3.0.0**- Compatibility may vary with later versions---## βΉοΈ ReferenceFlowise Docs: https://docs.flowiseai.com/Hugging Face Space Settings: https://huggingface.co/docs/hub/spaces
123456789101112{"port": 7860,"flowiseUsername": "admin","flowisePassword": "admin","databasePath": "/data/.flowise","logPath": "/data/.flowise/logs","tempUploadDir": "/data/uploads","chroma": {"mode": "remote","url": "http://localhost:8000"}}123456789101112{"port": 7860,"flowiseUsername": "admin","flowisePassword": "admin","databasePath": "/data/.flowise","logPath": "/data/.flowise/logs","tempUploadDir": "/data/uploads","chroma": {"mode": "remote","url": "http://localhost:8000"}}
Dockerfile+65-57
README.md+64-48
flowise.json+12-12