替换html2image为playwright方案

This commit is contained in:
puke committed 2026-04-13 11:29:05 +08:00
1 parent 900df3ab39
commit fd39263dd7
8 files changed
+2037 -2118

No files matched your search

+4 -12
View File
@@ -34,23 +34,11 @@ sudo apt-get install -y --no-install-recommends \
xdg-utils \
ca-certificates || true
# Install chromium
echo "[devcontainer] Installing chromium..."
sudo apt-get install -y --no-install-recommends chromium 2>/dev/null || true
# Verify installation
echo "[devcontainer] Verifying system packages..."
echo "[devcontainer] Chinese fonts (sample):"
fc-list :lang=zh | head -n 10 || true
if command -v chromium >/dev/null 2>&1; then
echo "[devcontainer] chromium -> $(command -v chromium)"
elif command -v chromium-browser >/dev/null 2>&1; then
echo "[devcontainer] chromium-browser -> $(command -v chromium-browser)"
else
echo "[devcontainer] Warning: chromium not found in PATH"
fi
# ============================================================================
# Python Dependencies Installation
# ============================================================================
@@ -63,4 +51,8 @@ pip install uv --quiet
echo "[devcontainer] Installing Python dependencies with uv..."
uv sync --frozen
# Install Playwright browser (Chromium for HTML template rendering)
echo "[devcontainer] Installing Playwright Chromium browser..."
uv run playwright install --with-deps chromium || true
echo "[devcontainer] postCreate complete. Streamlit will start automatically via postStart.sh"