Dockerfile-hugginface #1682
amansoniamazatic
started this conversation in
General
Replies: 1 comment 7 replies
-
What's the need/use case for using git instead of npm install -g? |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want a dockerfile which clone the flowise repo and install the flowise it should be able to run on hugginface below is my code which is running properly on local machine but i am not able to run the same in hugginface if anyone has any code or idea please provide.
Note: I don't want to install flowise using npm install -g flowise i only want from github.
Below is my Dockerfile:
Use Node.js 18 Alpine as base image
FROM node:18-alpine
Create the /data directory with appropriate permissions
RUN mkdir -p /data && chmod -R 777 /data
USER root
Arguments that can be passed at build time
ARG FLOWISE_PATH=/usr/local/lib/node_modules/flowise
ARG BASE_PATH=/data/.flowise
ARG DATABASE_PATH=$BASE_PATH
ARG APIKEY_PATH=$BASE_PATH
ARG SECRETKEY_PATH=$BASE_PATH
ARG LOG_PATH=$BASE_PATH/logs
Set the ARGs as ENV
ENV FLOWISE_PATH=$FLOWISE_PATH
ENV BASE_PATH=$BASE_PATH
ENV DATABASE_PATH=$DATABASE_PATH
ENV APIKEY_PATH=$APIKEY_PATH
ENV SECRETKEY_PATH=$SECRETKEY_PATH
ENV LOG_PATH=$LOG_PATH
Install dependencies
RUN apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev chromium
ENV PUPPETEER_SKIP_DOWNLOAD=true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
Clone the Flowise repository from GitHub
RUN git clone https://github.com/FlowiseAI/Flowise.git /app
WORKDIR /app
Install Flowise dependencies
RUN yarn install
RUN yarn build
Configure Flowise directories using the ARG
RUN mkdir -p $FLOWISE_PATH/uploads && chmod -R 777 $FLOWISE_PATH
Expose the necessary ports (if required by Flowise)
EXPOSE 7860
Set the entry point to run Flowise
CMD ["sh", "-c", "mkdir -p $LOG_PATH && chmod -R 777 $LOG_PATH && npx flowise start"]
Beta Was this translation helpful? Give feedback.
All reactions