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

Offer Linux aarch64 binary for download #1956

Closed
mtricolici opened this issue Nov 11, 2021 · 27 comments
Closed

Offer Linux aarch64 binary for download #1956

mtricolici opened this issue Nov 11, 2021 · 27 comments

Comments

@mtricolici
Copy link

linux aarch64 binaries please? :) I'm on mac . but we run tests in docker...so it's a linux with aarch64

@whimboo
Copy link
Collaborator

whimboo commented Jan 4, 2022

@mtricolici you are the first one who requests such a build. So I'm not inclined to immediately offer it as artifact on the release page. Would it be ok for you if you could more easily build it yourself via cargo install geckodriver? Or won't you have the Rust toolchain installed?

Note that you could always build geckodriver yourself and then distribute this binary across your docker instances.

@mtricolici
Copy link
Author

make sense. thanks. closing the issue.

@whimboo
Copy link
Collaborator

whimboo commented Jan 21, 2022

I would suggest to leave this issue open so if wider interest is shown we could consider adding support by default.

@whimboo whimboo reopened this Jan 21, 2022
@whimboo whimboo changed the title linux aarch64 binaries Offer Linux aarch64 binary for download Jan 21, 2022
@lazzurs
Copy link

lazzurs commented Jan 24, 2022

I have also requested the same thing for the same reason, running builds on macOS in Docker.

@jamesmortensen
Copy link

For those who want it, you can find an ARM64 geckodriver binary here in this repository: https://github.com/jamesmortensen/geckodriver-arm-binaries/releases

There's also some instructions in the README to build it yourself using Docker.

@jamesmortensen
Copy link

@whimboo There are a number of Mac M1 and Raspberry Pi users who have requested multi-arch docker-selenium images so they can run tests on their Mac M1 or Raspberry Pi, using the Selenium Docker container images.

I am currently working on an experimental community fork of docker-selenium, docker-seleniarm, which builds container images for amd64, arm64, and armhf and publishes to Docker Hub. The biggest challenge we face with multi-arch images is having browser binaries and webdrivers available for those platforms, specifically arm64 (aarch64) and armhf (arm/v7).

To simplify the build process of the container images, I built and hosted the aarch64 geckodriver binary myself. When building the docker-seleniarm Firefox images, retrieving the geckodriver binary is now the same for both amd64 and arm64 platforms. This also makes it easier for others to build the seleniarm container images themselves, without having to build the arm64 geckodriver, which is not always easy if you're new to building geckodriver.

This Dockerfile from docker-seleniarm will give you an idea of how having a hosted geckodriver arm64 binary is helpful:

https://github.com/seleniumhq-community/docker-seleniarm/blob/08782a43ebc985ed48aa970a7dccad4d5e896b9d/NodeFirefox/Dockerfile.arm64#L30

For now, I think folks can get the Linux ARM binary from https://github.com/jamesmortensen/geckodriver-arm-binaries/releases, but if you wanted to actually host the ARM builds here, I could possibly work on a GitHub Action that builds the binary for Linux aarch64 and publishes as an artifact.

@whimboo
Copy link
Collaborator

whimboo commented Mar 21, 2022

Thank you for the information @jamesmortensen. Regarding the downloads of the ARM binaries would you mind to specifically name them as inofficial? It should be clear when downloading these that they aren't shipped from us. Thanks.

Also note that since geckodriver 0.30.0 we officially offer the MacOS ARM binaries for download. So it's really just the Linux ones that are missing. And for these the number of users were too low in the past to actually get these binaries added. If we want to do that it won't work via a github action, but it needs to be done in our own CI. Otherwise we won't be able to run the signing tasks (which wouldn't apply to Linux here).

@jamesmortensen
Copy link

@whimboo I made some changes to the README to clarify even further that this is an unofficial build. Please let me know specifically if there is anything else you'd like me to change. https://github.com/jamesmortensen/geckodriver-arm-binaries

Also updated the release notes: https://github.com/jamesmortensen/geckodriver-arm-binaries/releases/tag/v0.30.0

@whimboo
Copy link
Collaborator

whimboo commented Mar 31, 2022

@jamesmortensen looks fine, thanks! One thing you might still wanna do is to provide md5 hash files for both binary assets.

@jamesmortensen
Copy link

@whimboo sorry to be such a noob, but just to confirm:

$ curl -L https://github.com/jamesmortensen/geckodriver-arm-binaries/releases/download/v0.30.0/geckodriver-v0.30.0-linux-aarch64.tar.gz -o geckodriver-v0.30.0-linux-aarch64.tar.gz
$ md5sum geckodriver-v0.30.0-linux-aarch64.tar.gz 
4f87128c54dd05b5d016d32ceb6701a5  geckodriver-v0.30.0-linux-aarch64.tar.gz

$ curl -L https://github.com/jamesmortensen/geckodriver-arm-binaries/releases/download/v0.30.0/geckodriver-v0.30.0-linux-armv7l.tar.gz -o geckodriver-v0.30.0-linux-armv7l.tar.gz
$ md5sum geckodriver-v0.30.0-linux-armv7l.tar.gz 
41ae3cbf3cfeb9bf69975f25b4ac55be  geckodriver-v0.30.0-linux-armv7l.tar.gz

Is this what you're looking for? If so, I'll add them to the release as:

geckodriver-v0.30.0-linux-aarch64.tar.gz.md5
geckodriver-v0.30.0-linux-armv7l.tar.gz.md5

@whimboo
Copy link
Collaborator

whimboo commented Mar 31, 2022

First note that you wanna do that before you upload the builds so maybe even include it into your build script like md5sum {file} > {file}.md5.

@jamesmortensen
Copy link

Ah, right, because the idea is to certify that nothing was tampered with in transit...

I'll rebuild the drivers and reupload together with the md5 hashes. Thank you.

@rbruckheimer
Copy link

I'd be interested in a Linux aarch64 geckodriver release as well.

@jamesmortensen
Copy link

@rbruckheimer Please see this unofficial repo. I have built geckodriver aarch64 for 0.31.0.

https://github.com/jamesmortensen/geckodriver-arm-binaries/releases/tag/v0.31.0

If you're not comfortable with these unofficial binaries which are not provided by Mozilla, there are instructions in the repo on how to build them yourself. Also, the entire build and release process happens in Github Actions, so you can also audit the process yourself. Hope this helps.

@whimboo
Copy link
Collaborator

whimboo commented Jun 16, 2022

Note that starting with the 0.31.0 release you can simply build geckodriver directly on your linux aarch64 device by running cargo install geckodriver, which for sure would require the Rust toolchain to be installed first.

@rbruckheimer
Copy link

@whimboo this works but it's pretty manual. We are in an environment where testers just run npm ci to install the testing environment including the geckodriver which just magically installs. Having to maintain a custom geckodriver npm package to pull down a custom build for linux aarch64 is not really ideal for automated environments.

@whimboo
Copy link
Collaborator

whimboo commented Jul 13, 2022

Note that I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1779386 to have this request covered on Bugzilla (which we haven't had yet).

@jamesmortensen
Copy link

@rbruckheimer Just curious, are you using this node module? https://www.npmjs.com/package/geckodriver It has an environment variable that allows us to specify a different CDN provider, but it just needs a handler to detect aarch64 and download linux-aarch64 geckodriver. If this is the module you're using, it might be easier in the meantime to open an issue with them and see if they can add Linux aarch64 as an additional option.

@rbruckheimer
Copy link

@jamesmortensen I do include that package as a dependency; however, I am not using it directly. It's used by webdriverIO and I have no control over its code.

@nodakai
Copy link

nodakai commented Aug 9, 2022

Several cloud providers now offer aarch64 VMs. If people are slow to adapt them or even just try them out, that's because the ecosystem is still being launched, as exemplified by this ticket. Few people have requested Mozilla for aarch64 binary releases because they have other blockers due to the immature ecosystem. It would be awesome if Mozilla could do something more productive than just saying they are merely one of several blockers for people wanting to use aarch64. I'd see it as one step towards improving Firefox's competitiveness against Chromes (amid the declining popularity)

I'm not affiliated with Arm Limited, not even a great fan of ARM instruction sets; however I do believe competitions among different computer architectures will make a positive impact on the future of computing, and decided to spend a few extra hours of my time on the aarch64 deployment of my system.

I've been using this for my .Net project https://github.com/rosolko/WebDriverManager.Net
and I'm quite hesitant to propose its authors to support the "unofficial" binaries as they are... unofficial.
Yes, I have the freedom of subclassing it to customize its behavior:

type FirefoxConfigWithArm64() =
  inherit FirefoxConfig()

  let user = "jamesmortensen"
  let repo = "geckodriver-arm-binaries"
  let rel = $"/{user}/{repo}/releases"
  let uri = $"https://github.com{rel}"

  override x.GetUrl64() =
    if OperatingSystem.IsLinux() && RuntimeInformation.OSArchitecture = Architecture.Arm64 then
      // "https://github.com/jamesmortensen/geckodriver-arm-binaries/releases/download/v0.31.0/geckodriver-v0.31.0-linux-aarch64.tar.gz"
      $"{uri}/download/v<version>/geckodriver-v<version>-linux-aarch64.tar.gz"
    else base.GetUrl64()

  override x.GetLatestVersion(): string =
    if RuntimeInformation.OSArchitecture = Architecture.Arm64 then
      use cli = new HttpClient()
      let html = cli.GetStringAsync(uri).Result
      let pat = $"\"{rel}/tag/v([\\d.]+)\""
      match Regex.Match(html, pat) with
      | null -> failwith $"%s{uri} didn't match %s{pat}"
      | m -> m.Groups[1].Value
    else base.GetLatestVersion()

but I have to say having to think about this customization was nothing but a friction to my original project... The unofficial binary above was quite helpful for me but I still had to find a Docker base image with glibc 2.33. With a larger user base that can give feedback (that I hope official binary releases help to create), this shouldn't have been necessary (people knew the need for manylinux and whatnot). DIY cargo build could work for me, but wouldn't help anybody else in the world.

@vincent-olivert-riera
Copy link

I would suggest to leave this issue open so if wider interest is shown we could consider adding support by default.

I'd be interested in a Linux aarch64 geckodriver release as well.

@afzl-wtu
Copy link

I also need linux aarch64 version

@cguess
Copy link

cguess commented Sep 1, 2022

I'd like to throw my hat in the ring for a ARM build for Linux as well. Like others I'm using Selenium on a M1 Mac within a VM (Parallels running Ubuntu for myself) and having an official release would be extraordinarily useful (with my thanks to @jamesmortensen, which I'm using in the moment).

As others have mentioned, ARM is a becoming an increasingly common architecture for use, and given the success of the M1/M2 Apple machines it's going to only expand from here on out.

@whimboo
Copy link
Collaborator

whimboo commented Sep 9, 2022

With https://bugzilla.mozilla.org/show_bug.cgi?id=1779386 fixed now we will ship Linux aarch64 binaries for geckodriver with its next 0.32.0 release which should happen in the near future.

In the meantime feel free to test a nightly build of geckodriver which can be found at:
https://treeherder.mozilla.org/jobs?repo=mozilla-central&searchStr=gd-s%2Clinux%2Caarch64&selectedTaskRun=FkwgReSxQxepaymc_OhNyg.0

The link to the binary can be found in the lower pane. Please let us know if something doesn't work so that we could still fix it for the upcoming release. Thanks!

@whimboo whimboo closed this as completed Sep 9, 2022
@whimboo
Copy link
Collaborator

whimboo commented Oct 13, 2022

I've just released geckodriver 0.32.0. Linux aarch64 binaries can be found as asset on the release page.

@harryqt
Copy link

harryqt commented Oct 16, 2022

On M2 Air do I download the "macos" or "macos-aarch64" ?

@jamesmortensen
Copy link

@Dibbyo456 the M2 is an arm64/aarch64 architecture, so you'd download the macos-aarch64 build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants