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

[ENH] - Create multi-platform images #1737

Closed
mathbunnyru opened this issue Jul 5, 2022 · 7 comments · Fixed by #1789
Closed

[ENH] - Create multi-platform images #1737

mathbunnyru opened this issue Jul 5, 2022 · 7 comments · Fixed by #1789
Labels
type:Arm Issue specific to arm architecture type:Enhancement A proposed enhancement to the docker images

Comments

@mathbunnyru
Copy link
Member

What docker image(s) is this feature applicable to?

all-spark-notebook, base-notebook, datascience-notebook, minimal-notebook, pyspark-notebook, r-notebook, scipy-notebook, tensorflow-notebook

What changes are you proposing?

It would be great to merge amd64 image with aarch64 image with the same tag into a single multi-platform image

How does this affect the user?

It would allow users not to specify aarch64- prefix.
Also, it will make make build/<somestack>-notebook work as expected, because it will always use correct parent image.

Anything else?

Implementation detail - this should probably be done in a separate reusable workflow, after pushing all images to DockerHub.
It would take a look which tags were pushed for amd64 and which for aarch64 and it would merge these tags.

@mathbunnyru mathbunnyru added type:Enhancement A proposed enhancement to the docker images type:Arm Issue specific to arm architecture labels Jul 5, 2022
@mathbunnyru mathbunnyru added this to the Major docker-stacks issues milestone Jul 5, 2022
@nathancarter
Copy link

I would love to see this. Just to give an example of why it's important:

Just got an M1 Mac and tried to re-use a VS Code devcontainer I have that's based on jupyter/datascience-notebook. A build script in one of my projects, which used to run just fine, now runs out of memory, because the AMD devcontainer is being run on an ARM chip and thus has to go through some semi-supported emulation business that I don't fully understand, except to note that out-of-memory errors are documented as something to be expected. I have to physically go to my PC to run that build script...kind of the opposite of the point of Docker. While I guess I could add the aarch64- prefix to the FROM line of my Dockerfile, that will make the project work on my Mac but not my PC.

In other words, things got worse when I bought a better computer. And there's no workaround. I'm not complaining; I'm just trying to clarify the significance of @mathbunnyru's issue. Thanks for opening it!

@mathbunnyru
Copy link
Member Author

mathbunnyru commented Jul 14, 2022

Thank you for sharing your use case.

I think right now you can use your have Dockerfile look like FROM $BASE_CONTAINER and have this BASE_CONTAINER set to different things for Mac and PC, if it's possible.
I know it's not ideal, but if it works, it's not that bad.

@msemelman
Copy link

Not sure if it completely fits current building setup, but maybe buildx could be used to simplify this:

https://docs.docker.com/build/buildx/

@mathbunnyru
Copy link
Member Author

Not sure if it completely fits current building setup, but maybe buildx could be used to simplify this:

https://docs.docker.com/build/buildx/

Unfortunately, docker buildx didn't work for us and created many issues and they were leading to bugs and very unpleasant things.
So far, current solution only has this issue.
You can see the details here and in the relevant issues: #1703

@mathbunnyru
Copy link
Member Author

@nathancarter @consideRatio @tomharvey @msemelman this is fixed now, please, take a look.

@tomharvey
Copy link

Massive thanks @mathbunnyru - my workflows just got a lot simpler!

@consideRatio
Copy link
Collaborator

Wieee great work on this @mathbunnyru!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Arm Issue specific to arm architecture type:Enhancement A proposed enhancement to the docker images
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants