Closed jimjam-slam closed 1 year ago
Having thought about this more, building and uploading with GitHub Actions is definitely the way t9 go 😅
Hi James,
I know you've found a solution, but you can also build x86 Docker images on an M1 Mac --- that's exactly what I do. You will need to use buildx
and add --platform=linux/amd64
to your build command.
Alternatively, you could try building your ARM images and hosting them with Graviton. I have no idea if that would work, since I haven't tried it myself.
Oooh, okay! Can you pass the platform currently being built into the Dockerfile (eg. to download the correct R version)?
Hey David! Some colleagues and I are looking at migrating some R functions to Lambda using
{lambdr}
. One sticking point we're hitting on is architectures: the Docker image needs to be built before it goes to ECR, and two of us are on Apple Silicon Macs (so buildingarm64
), while the other's on an Intel Mac (x86
).Do you know if there's a way to build a multi-architecture image and send that to ECR?
Right now when I build it gets stuck installing R (since the architecture is hardcoded into the Dockerfile—but perhaps it could check that?):
Or perhaps it's better to have a GitHub Action build and upload the Docker image, so that we're all on one architecture?