liaoch commited on
Commit
03fdcea
·
1 Parent(s): 6fa8cf7

New file: packages.txt

Browse files

- Lists all required system packages for Chrome/Chromium
- Hugging Face Spaces will automatically install these

Updated: mermaid_renderer.py
- Added Puppeteer configuration with sandbox-disabled flags
- Required for running Chrome in containerized environments

Files changed (2) hide show
  1. mermaid_renderer.py +1 -0
  2. packages.txt +14 -0
mermaid_renderer.py CHANGED
@@ -84,6 +84,7 @@ class MermaidRenderer:
84
  "-i", input_path,
85
  "-o", output_path,
86
  "-t", theme,
 
87
  # No -f flag needed for mmdc, format is determined by -o extension
88
  # However, explicitly setting background color might be needed for transparency
89
  # "-b", "transparent" # Example: if you want transparent background for PNG/SVG
 
84
  "-i", input_path,
85
  "-o", output_path,
86
  "-t", theme,
87
+ "--puppeteerConfig", '{"args":["--no-sandbox","--disable-setuid-sandbox","--disable-dev-shm-usage","--disable-accelerated-2d-canvas","--no-first-run","--no-zygote","--single-process","--disable-gpu"]}',
88
  # No -f flag needed for mmdc, format is determined by -o extension
89
  # However, explicitly setting background color might be needed for transparency
90
  # "-b", "transparent" # Example: if you want transparent background for PNG/SVG
packages.txt ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ chromium
2
+ chromium-driver
3
+ libnss3
4
+ libnspr4
5
+ libatk1.0-0
6
+ libatk-bridge2.0-0
7
+ libdrm2
8
+ libxkbcommon0
9
+ libxcomposite1
10
+ libxdamage1
11
+ libxrandr2
12
+ libgbm1
13
+ libxss1
14
+ libasound2