AlabamaWaterInstitute / CloudInfra

NextGen In A Box: NextGen Framework National Water Model Community Release
5 stars 24 forks source link

docker not available on macos runners #51

Open hellkite500 opened 1 year ago

hellkite500 commented 1 year ago

https://github.com/AlabamaWaterInstitute/CloudInfra/blob/b8ae828477edd10577feac6db51ac6dfa9a636a0/.github/workflows/arm_docker_build.yml#L9

This workflow will not work on a macos runner, which is why the deployment actions are failing for arm builds.

See this disscussion about using docker on macos hosted runners.

hellkite500 commented 1 year ago

https://github.com/docker/setup-qemu-action

It might be possible to use this action to setup qemu and run docker in the hosted ubuntu machine and cross compile using the emulator. It will be slower, but should work.

Here is a reasonably well written walk through. https://blog.thesparktree.com/docker-multi-arch-github-actions

arpita0911patel commented 1 year ago

Running using buildx on github actions is taking 4-5 hours to finish the job and errored out with:

workflow: https://github.com/CIROH-UA/CloudInfra/actions/runs/4851988614/jobs/8646421680

ERROR:

31 0.202 Error while loading /ngen/t-route/./compiler.sh: Exec format error

We either need big runners on the enterprise account for that or run it on self-hosted runner.

benlee0423 commented 1 year ago

Did simple experiement. runs-on: ubuntu-latest Succeed without any error. runs-on:macos-latest Getting the following error during docker login. Unable to locate executable file: docker. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable. Obviously, macos hosted runner doesn't have docker installed. Not sure what we want to achieve from the issue. It looks like ubuntu-latest with buildx will build arm64. I have a sample project that build arm64 with ubuntu and QEMU in the below actions. https://github.com/benlee0423/action-demo/actions/runs/5073558686