mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 17:01:00 +03:00
Merge pull request #504 from AidanTilgner/bugfix/puppeteer-chromium-not-found
fix: docker should install chromium and puppeteer should be no sandbox
This commit is contained in:
@@ -8,7 +8,12 @@ FROM node:18-alpine
|
|||||||
RUN apk add --update libc6-compat python3 make g++
|
RUN apk add --update libc6-compat python3 make g++
|
||||||
# needed for pdfjs-dist
|
# needed for pdfjs-dist
|
||||||
RUN apk add --no-cache build-base cairo-dev pango-dev
|
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_SKIP_DOWNLOAD=true
|
||||||
|
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
||||||
|
|
||||||
WORKDIR /usr/src/packages
|
WORKDIR /usr/src/packages
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,12 @@ RUN apk add --no-cache git
|
|||||||
RUN apk add --no-cache python3 py3-pip make g++
|
RUN apk add --no-cache python3 py3-pip make g++
|
||||||
# needed for pdfjs-dist
|
# needed for pdfjs-dist
|
||||||
RUN apk add --no-cache build-base cairo-dev pango-dev
|
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_SKIP_DOWNLOAD=true
|
||||||
|
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
|
||||||
|
|
||||||
# You can install a specific version like: flowise@1.0.0
|
# You can install a specific version like: flowise@1.0.0
|
||||||
RUN npm install -g flowise
|
RUN npm install -g flowise
|
||||||
|
|||||||
@@ -73,7 +73,12 @@ class Puppeteer_DocumentLoaders implements INode {
|
|||||||
|
|
||||||
const puppeteerLoader = async (url: string): Promise<any> => {
|
const puppeteerLoader = async (url: string): Promise<any> => {
|
||||||
let docs = []
|
let docs = []
|
||||||
const loader = new PuppeteerWebBaseLoader(url)
|
const loader = new PuppeteerWebBaseLoader(url, {
|
||||||
|
launchOptions: {
|
||||||
|
args: ['--no-sandbox'],
|
||||||
|
headless: 'new'
|
||||||
|
}
|
||||||
|
})
|
||||||
if (textSplitter) {
|
if (textSplitter) {
|
||||||
docs = await loader.loadAndSplit(textSplitter)
|
docs = await loader.loadAndSplit(textSplitter)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user