Hugging Face | FlowiseAI (original) (raw)

  1. Configurationchevron-right
  2. Deployment

Hugging Face

Learn how to deploy Flowise on Hugging Face


  1. Select Docker as Space SDK and choose Blank as the Docker template.
  2. Select CPU basic ∙ 2 vCPU ∙ 16GB ∙ FREE as Space hardware.

Set the environment variables

  1. Go to Settings of your new space and find the Variables and Secrets section
  2. Click on New variable and add the name as PORT with value 7860
  3. (Optional) Click on New secret
  4. (Optional) Fill in with your environment variables, such as database credentials, file paths, etc. You can check for valid fields in the .env.example herearrow-up-right

  1. At the files tab, click on button + Add file and click on Create a new file (or Upload files if you prefer to)
  2. Create a file called Dockerfile and paste the following:
  3. Click on Commit file to **main** and it will start to build your app.

When the build finishes you can click on the App tab to see your app running.

Last updated 5 months ago

FROM node:20-alpine
USER root

# Arguments that can be passed at build time
ARG FLOWISE_PATH=/usr/local/lib/node_modules/flowise
ARG BASE_PATH=/root/.flowise
ARG DATABASE_PATH=$BASE_PATH
ARG SECRETKEY_PATH=$BASE_PATH
ARG LOG_PATH=$BASE_PATH/logs
ARG BLOB_STORAGE_PATH=$BASE_PATH/storage

# 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

# Install Flowise globally
RUN npm install -g flowise

# Configure Flowise directories using the ARG
RUN mkdir -p <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>L</mi><mi>O</mi><msub><mi>G</mi><mi>P</mi></msub><mi>A</mi><mi>T</mi><mi>H</mi></mrow><annotation encoding="application/x-tex">LOG_PATH </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8333em;vertical-align:-0.15em;"></span><span class="mord mathnormal">L</span><span class="mord mathnormal" style="margin-right:0.02778em;">O</span><span class="mord"><span class="mord mathnormal">G</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3283em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.13889em;">P</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mord mathnormal">A</span><span class="mord mathnormal" style="margin-right:0.13889em;">T</span><span class="mord mathnormal" style="margin-right:0.08125em;">H</span></span></span></span>FLOWISE_PATH/uploads && chmod -R 777 <span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>L</mi><mi>O</mi><msub><mi>G</mi><mi>P</mi></msub><mi>A</mi><mi>T</mi><mi>H</mi></mrow><annotation encoding="application/x-tex">LOG_PATH </annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8333em;vertical-align:-0.15em;"></span><span class="mord mathnormal">L</span><span class="mord mathnormal" style="margin-right:0.02778em;">O</span><span class="mord"><span class="mord mathnormal">G</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3283em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.13889em;">P</span></span></span></span><span class="vlist-s">​</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mord mathnormal">A</span><span class="mord mathnormal" style="margin-right:0.13889em;">T</span><span class="mord mathnormal" style="margin-right:0.08125em;">H</span></span></span></span>FLOWISE_PATH

WORKDIR /data

CMD ["npx", "flowise", "start"]