quiago commited on
Commit
908c917
·
1 Parent(s): 753d673

Add application file3

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -11
Dockerfile CHANGED
@@ -1,16 +1,27 @@
1
- # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
- # you will also find guides on how best to write your Dockerfile
3
 
4
- FROM python:3.9
 
 
 
 
 
 
 
5
 
6
- RUN useradd -m -u 1000 user
7
- USER user
8
- ENV PATH="/home/user/.local/bin:$PATH"
9
 
10
- WORKDIR /app
 
11
 
12
- COPY --chown=user ./requirements.txt requirements.txt
13
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
14
 
15
- COPY --chown=user . /app
16
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
1
+ FROM node:18-alpine
2
+ USER root
3
 
4
+ # Arguments that can be passed at build time
5
+ ARG FLOWISE_PATH=/usr/local/lib/node_modules/flowise
6
+ ARG BASE_PATH=/root/.flowise
7
+ ARG DATABASE_PATH=$BASE_PATH
8
+ ARG APIKEY_PATH=$BASE_PATH
9
+ ARG SECRETKEY_PATH=$BASE_PATH
10
+ ARG LOG_PATH=$BASE_PATH/logs
11
+ ARG BLOB_STORAGE_PATH=$BASE_PATH/storage
12
 
13
+ # Install dependencies
14
+ RUN apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev chromium
 
15
 
16
+ ENV PUPPETEER_SKIP_DOWNLOAD=true
17
+ ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
18
 
19
+ # Install Flowise globally
20
+ RUN npm install -g flowise
21
 
22
+ # Configure Flowise directories using the ARG
23
+ RUN mkdir -p $LOG_PATH $FLOWISE_PATH/uploads && chmod -R 777 $LOG_PATH $FLOWISE_PATH
24
+
25
+ WORKDIR /data
26
+
27
+ CMD ["npx", "flowise", "start"]