mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-22 09:01:09 +03:00
fix: docker should install chromium and puppeteer should be no sandbox
This commit is contained in:
@@ -6,7 +6,12 @@ RUN apk add --no-cache git
|
||||
RUN apk add --no-cache python3 py3-pip make g++
|
||||
# needed for pdfjs-dist
|
||||
RUN apk add --no-cache build-base cairo-dev pango-dev
|
||||
|
||||
# Install Chromium
|
||||
RUN apk add --no-cache chromium
|
||||
|
||||
ENV PUPPETEER_SKIP_DOWNLOAD=true
|
||||
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
||||
|
||||
# You can install a specific version like: flowise@1.0.0
|
||||
RUN npm install -g flowise
|
||||
|
||||
@@ -73,7 +73,12 @@ class Puppeteer_DocumentLoaders implements INode {
|
||||
|
||||
const puppeteerLoader = async (url: string): Promise<any> => {
|
||||
let docs = []
|
||||
const loader = new PuppeteerWebBaseLoader(url)
|
||||
const loader = new PuppeteerWebBaseLoader(url, {
|
||||
launchOptions: {
|
||||
args: ['--no-sandbox'],
|
||||
headless: 'new'
|
||||
}
|
||||
})
|
||||
if (textSplitter) {
|
||||
docs = await loader.loadAndSplit(textSplitter)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user