From f71545a4b0ed01838ae4fa890af38ad894626bea Mon Sep 17 00:00:00 2001 From: Wee Date: Sun, 17 Apr 2022 21:31:33 +0700 Subject: [PATCH] Allow the Playwright installation to fail Excluded Playwright from requirements.txt to prevent arm/v6 and arm/v7 builds from failing. --- Dockerfile | 5 +++++ requirements.txt | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2e8131f7e..23a3f2c45 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,11 @@ COPY requirements.txt /requirements.txt RUN pip install --target=/dependencies -r /requirements.txt +# Playwright is an alternative to Selenium +# Excluded this package from requirements.txt to prevent arm/v6 and arm/v7 builds from failing +RUN pip install --target=/dependencies playwright~=1.20 \ + || echo "WARN: Failed to install Playwright. The application can still run, but the Playwright option will be disabled." + # Final image stage FROM python:3.8-slim diff --git a/requirements.txt b/requirements.txt index 2a8be8e38..d50f3f80a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -34,6 +34,3 @@ lxml # 3.141 was missing socksVersion, 3.150 was not in pypi, so we try 4.1.0 selenium ~= 4.1.0 - -# An alternative to Selenium -playwright ~= 1.20