-
-
Notifications
You must be signed in to change notification settings - Fork 15.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dockerfile fix to run on Hugging Face #690
base: main
Are you sure you want to change the base?
Conversation
hey @lucianotonet can you elaborate what is this PR for? |
Refactored Dockerfile to fix permission errors with dynamic paths
Objective of the ChangeThe existing Dockerfile needed adjustments to run on Hugging Face Spaces. This pull request introduces changes to make the Dockerfile more flexible and optimized for deployment in that specific environment. Changes Made
Detailed Changes+ ARG FLOWISE_PATH=/usr/local/lib/node_modules/flowise
+ ARG PORT=7860
+ ARG PASSPHRASE=
+ ARG DATABASE_PATH=/root/.flowise
+ ARG APIKEY_PATH=/root/.flowise
+ ARG SECRETKEY_PATH=/root/.flowise
+ ARG LOG_PATH=/root/.flowise/logs
+ RUN apk add --no-cache git python3 py3-pip make g++ build-base cairo-dev pango-dev chromium
+ ENV PORT=$PORT
+ ENV PASSPHRASE=$PASSPHRASE
+ ENV DATABASE_PATH=$DATABASE_PATH
+ ENV APIKEY_PATH=$APIKEY_PATH
+ ENV SECRETKEY_PATH=$SECRETKEY_PATH
+ ENV LOG_PATH=$LOG_PATH
+ RUN mkdir -p $FLOWISE_PATH && chmod -R 777 $FLOWISE_PATH
+ RUN mkdir -p $LOG_PATH && chmod -R 777 $LOG_PATH
+ RUN mkdir -p $FLOWISE_PATH/uploads && chmod -R 777 $FLOWISE_PATH/uploads
+ CMD ["npx", "flowise", "start"]
- RUN apk add --no-cache git
- RUN apk add --no-cache python3 py3-pip make g++
- RUN apk add --no-cache build-base cairo-dev pango-dev
- RUN apk add --no-cache chromium
- CMD "flowise" ImpactThese changes ensure that the project can be run on Hugging Face Spaces, expanding deployment possibilities. By optimizing the Dockerfile, users can now quickly start the application without the need to make corrections to the Dockerfile or even set any environment var. This enhances the user experience and makes the Dockerfile more maintainable and user-friendly. |
@lucianotonet tried running HF space got this error: |
Fix and optimization
Hi @HenryHengZJ. Thank you for pointing that out 👍 |
Fix based on this: FlowiseAI/Flowise#690 (comment)
thanks @lucianotonet it works now! https://huggingface.co/spaces/FlowiseAI/Flowise Can we make another folder on Flowise like This is because the Dockerfile inside docker folder is used for docker-compose image. Modifying this file causes |
Hi @lucianotonet just wondering if this PR is still relevant/live or if it needs to be adjusted because of changes since last message - it's quite old and if it's been superceded by other changes perhaps it should be closed off here so that the outstanding live PR count can be kept low for better admin engagement? Thanks. |
Hey @deep-pipeline |
@deep-pipeline I tested and it seems to be working on Hugging Face as expected. PS how to work with authentication and private data? Where can I learn about it? |
No description provided.