Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ARM support for Docker #65

Merged
merged 4 commits into from
Mar 25, 2023
Merged

Add ARM support for Docker #65

merged 4 commits into from
Mar 25, 2023

Conversation

jdholtz
Copy link
Owner

@jdholtz jdholtz commented Mar 25, 2023

Fixes #27.

Many improvements were made to the Docker image:

  • Chromium is now used, enabling the image to be built and ran on ARM architecture
  • Alpine Linux is now used, reducing image size by 40%

Disadvantages:

  • Since Alpine Linux is used, a few Python packages have to be built from source. This makes the build time much longer (about 5 minutes longer on my machine)

Other Important Changes

  • The script now officially supports any Chromium-based browser (it only unofficially did before)
  • Users can specify the path to a custom Chromedriver executable in the config.json if they choose to. This can also be used in place of chrome_version to stop undetected_chromedriver from trying to download the latest Chromedriver

jdholtz added 4 commits March 24, 2023 19:00
This will be used for the better Docker image. In the image,
Chromedriver is downloaded when built (undetected_chromedriver doesn't
find the file correctly in Alpine). Therefore, the path is automatically
set in the image for undetected_chromedriver to use.
The Docker image now uses Chromium instead of Google Chrome. This means
that official support for ARM architecture can be added.

Built and run successfully on aarch64. The image size has reduced by 40%
because Alpine is now used and Chromium is lighter than Chrome.

The build time is slower now (5-8min on my Raspberry Pi) due to the need
to build Python wheels (notably cffi and zstandard).
It's probably best to use the latest supported version (and it has some
performance improvements too!)
@jdholtz jdholtz merged commit 4fbdcd8 into develop Mar 25, 2023
@jdholtz jdholtz deleted the docker_improvements branch March 25, 2023 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant