I’m using version 2023.06.0 of repo2docker to create a custom kernel image for JupyterHub. I have a mostly empty github repo (only has a requirements.txt file)
when I run it on my Mac like this
jupyter-repo2docker <repo-link>
it results in a 2.45GB image. however it’s in arm64 architecture (verified with docker inspect) and I tried different arguments to change the platform but haven’t gotten it to work yet so I decided to just try it on my throwaway Ubuntu VM. However, I couldn’t get docker to run without root, so I just installed everything in root for the purposes of creating the image and ran this
but this results in a 7.52GB image size. why? I thought it would just take whatever base image it uses and install the requirements.txt on top of it, what is making it +5GB in size?
So I tried a new combination of args to attempt to create an image in amd64 format - which it did (after several minutes) but it’s also 7.24GB. is this expected for amd64?
[Warning] The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Have you tried comparing the build logs, and the packages that are installed? Maybe your dependencies are built differently for amd and arm? E.g. perhaps one comes with extra libraries, requires compilation, or happens to create more temporary files.
You could try inspecting the image layers to find out which ones are larger than expected?