RMI-PACTA / workflow.factset

Other
0 stars 0 forks source link

`arm64` build failing #43

Closed AlexAxthelm closed 3 months ago

AlexAxthelm commented 4 months ago

As noted by @cjyetman in https://github.com/RMI-PACTA/workflow.factset/pull/42#issuecomment-1943686343, the current Dockerfile does not build on arm64 platforms (M1 Macs).

From that comment:

I suspect this is because of a combination of:

  • running on an arm64 Mac
  • using a Dockerfile that does not explicitly set a platform, in which case arm64 is chosen by default for me
  • the CRAN repo is set to a Posit Package Manager URL
  • Posit Package Manager seems to be having difficulty returning proper arm64 linux builds of packages, e.g. it returns something, but it's not an actual binary (source, but not compiled)

I modified the Dockerfile with FROM --platform=linux/amd64 rocker/r-ver:$R_VERS AS base and it successfully built the image.

AlexAxthelm commented 4 months ago

Current workaround: prior to build, export DOCKER_DEFAULT_PLATFORM to set preferred architecture

export DOCKER_DEFAULT_PLATFORM=linux/amd64