dask-docker icon indicating copy to clipboard operation
dask-docker copied to clipboard

Add arm builds to docker images

Open holdenk opened this issue 4 years ago • 8 comments

It would be really useful if the default builds supported arm, docker buildx makes this a lot easier than it used to be.

holdenk avatar Sep 27 '20 02:09 holdenk

cc @jacobtomlinson for when he gets back.

@holdenk I'm curious, how often do you see people using docker on arm for dask-like workloads today? I'm curious how much we should be prioritizing this.

mrocklin avatar Sep 28 '20 17:09 mrocklin

I’m not sure, for my use case it’s for trying to use dask on kubernetes with Jetsons which are ARM based.

holdenk avatar Sep 28 '20 17:09 holdenk

This sounds reasonable. As Dask is pure Python there is no reason why ARM shouldn't just work. Although it is worth noting that we are not currently testing against ARM.

We currently use the docker-compose build command to build our images via CI. It looks like we can use the new experimental docker buildx bake command to do the same for multiple architectures.

It looks like buildx is still experimental so may take some looking into.

jacobtomlinson avatar Oct 19 '20 10:10 jacobtomlinson

https://www.docker.com/blog/getting-started-with-docker-for-arm-on-linux/

jacobtomlinson avatar Oct 19 '20 10:10 jacobtomlinson

Enabling building for ARM has been completed in #166 thanks to @holdenk!

In #149 we updated the CI/CD to use GitHub Actions to build and push our images.

Due to a limitation in buildx the upstream Jupyter Lab image needs to be built first, and then the Dask images built in a separate step. The build instructions in the README demonstrate pushing the interim image to a registry in order for it to be loaded back in.

This isn't possible during an unprivileged CI run as there are no credentials to push to a registry. To work around this we load the image into Docker and use the docker driver for building.

https://github.com/dask/dask-docker/blob/2f81f713758dd58058dfe828e54790d8655649b8/.github/workflows/build.yml#L68

https://github.com/dask/dask-docker/blob/2f81f713758dd58058dfe828e54790d8655649b8/.github/workflows/build.yml#L33

However the docker driver does not support building for ARM. So although it is possible to build these images for ARM we are not building and pushing them automatically currently via CI.

@holdenk do you have any suggestions on how we could work around this? Can the image cache be exported/imported in a different way? Or perhaps we need to set up some local temporary registry and push the interim image there?

jacobtomlinson avatar Aug 17 '21 09:08 jacobtomlinson

I'm going to reopen this until we get CI builds running. If you have any thoughts @holdenk I'd be keen to hear as I'm a bit stuck.

jacobtomlinson avatar Sep 24 '21 14:09 jacobtomlinson

Sure one option is using qemu to cross build in the CI. Let me see what I can figure out this weekend :)

holdenk avatar Sep 24 '21 14:09 holdenk

Hello! Is there any progress on this issue?

jmorenobl avatar Mar 22 '22 00:03 jmorenobl