Update wrapper/docker-entrypoint.sh
This commit is contained in:
parent
8b67073ce2
commit
a93783b0fd
@ -33,12 +33,12 @@ if [ -f requirements.txt ]; then
|
|||||||
pip install --no-cache-dir -r requirements.txt
|
pip install --no-cache-dir -r requirements.txt
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# --- Playwright browser runtime (cached in /cache so it persists) ---
|
# Cache Playwright browsers in /cache so it persists across restarts
|
||||||
export PLAYWRIGHT_BROWSERS_PATH="${PLAYWRIGHT_BROWSERS_PATH:-/cache/pw-browsers}"
|
export PLAYWRIGHT_BROWSERS_PATH="${PLAYWRIGHT_BROWSERS_PATH:-/cache/pw-browsers}"
|
||||||
|
|
||||||
if python -c "import playwright" >/dev/null 2>&1; then
|
if python -c "import playwright" >/dev/null 2>&1; then
|
||||||
if [ ! -d "$PLAYWRIGHT_BROWSERS_PATH" ] || [ -z "$(ls -A "$PLAYWRIGHT_BROWSERS_PATH" 2>/dev/null)" ]; then
|
if [ ! -d "$PLAYWRIGHT_BROWSERS_PATH" ] || [ -z "$(ls -A "$PLAYWRIGHT_BROWSERS_PATH" 2>/dev/null)" ]; then
|
||||||
echo "[Wrapper] Installing Playwright Chromium to $PLAYWRIGHT_BROWSERS_PATH ..."
|
echo "[Wrapper] Installing Playwright Chromium to $PLAYWRIGHT_BROWSERS_PATH ..."
|
||||||
# try without OS deps first; if your base has them it’s faster
|
|
||||||
python -m playwright install chromium || python -m playwright install --with-deps chromium
|
python -m playwright install chromium || python -m playwright install --with-deps chromium
|
||||||
else
|
else
|
||||||
echo "[Wrapper] Playwright browser cache present at $PLAYWRIGHT_BROWSERS_PATH"
|
echo "[Wrapper] Playwright browser cache present at $PLAYWRIGHT_BROWSERS_PATH"
|
||||||
|
Loading…
Reference in New Issue
Block a user