KoalaFlow commited on
Commit
d93c700
·
verified ·
1 Parent(s): e4e5cbe

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -8
Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
  FROM node:18-slim
2
 
3
- # Install OS deps
4
  RUN apt-get update && apt-get install -y \
5
  git \
6
  python3 \
@@ -12,27 +12,29 @@ RUN apt-get update && apt-get install -y \
12
  curl \
13
  && apt-get clean && rm -rf /var/lib/apt/lists/*
14
 
 
15
  ENV PUPPETEER_SKIP_DOWNLOAD=true
16
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
17
 
18
- # Install Flowise and Chroma with gunicorn
19
  RUN npm install -g flowise@3.0.0
20
- RUN pip3 install chromadb==0.4.24 gunicorn --break-system-packages
 
21
 
22
- # Fix log write crash
23
  RUN mkdir -p /usr/local/lib/node_modules/flowise/logs && chmod -R 777 /usr/local/lib/node_modules/flowise
24
 
25
- # Persistent data dirs
26
  WORKDIR /data
27
  RUN mkdir -p /data/.flowise/logs /data/.flowise/storage /data/uploads /data/chroma && chmod -R 777 /data
28
 
29
- # Add config
30
  COPY flowise.json /data/flowise.json
31
 
32
- # Expose ports
33
  EXPOSE 7860 8000
34
 
35
- # Run Chroma properly, wait, then start Flowise
36
  CMD sh -c "gunicorn chromadb.app:app --bind 0.0.0.0:8000 & \
37
  while ! curl -s http://localhost:8000 > /dev/null; do echo 'Waiting for Chroma...'; sleep 1; done && \
38
  npx flowise start"
 
1
  FROM node:18-slim
2
 
3
+ # Install OS dependencies
4
  RUN apt-get update && apt-get install -y \
5
  git \
6
  python3 \
 
12
  curl \
13
  && apt-get clean && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Puppeteer config
16
  ENV PUPPETEER_SKIP_DOWNLOAD=true
17
  ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
18
 
19
+ # Install Flowise and ChromaDB with fixed NumPy
20
  RUN npm install -g flowise@3.0.0
21
+ RUN pip3 install numpy==1.26.4 && \
22
+ pip3 install chromadb==0.4.24 gunicorn --break-system-packages
23
 
24
+ # Fix for Flowise log write on boot
25
  RUN mkdir -p /usr/local/lib/node_modules/flowise/logs && chmod -R 777 /usr/local/lib/node_modules/flowise
26
 
27
+ # Create persistent data directories
28
  WORKDIR /data
29
  RUN mkdir -p /data/.flowise/logs /data/.flowise/storage /data/uploads /data/chroma && chmod -R 777 /data
30
 
31
+ # Copy Flowise config
32
  COPY flowise.json /data/flowise.json
33
 
34
+ # Expose ports (optional)
35
  EXPOSE 7860 8000
36
 
37
+ # Start ChromaDB, wait for it, then start Flowise
38
  CMD sh -c "gunicorn chromadb.app:app --bind 0.0.0.0:8000 & \
39
  while ! curl -s http://localhost:8000 > /dev/null; do echo 'Waiting for Chroma...'; sleep 1; done && \
40
  npx flowise start"