-
Notifications
You must be signed in to change notification settings - Fork 219
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
[manylinux2014] Rework scripts to be more docker cache friendly #879
[manylinux2014] Rework scripts to be more docker cache friendly #879
Conversation
4d5f75b
to
fe9ccda
Compare
fe9ccda
to
33f1acf
Compare
33f1acf
to
6c321b6
Compare
6c321b6
to
9c2a018
Compare
This won't change travis-ci build time (at least for now) but allows maintainers/contributors to benefit from docker caching for local developments (faster builds at the expense of higher disk usage) Round 1 Use docker multi-stage build to build the manylinux image in 3 steps: 1. runtime_base: this image has all the necessary bits that are common to the build_base image and the manylinux image. This includes system packages required for runtime, the gcc toolchain & some basic tools. 2. build_base: this image builds all the remaining tools required for the manylinux image. Any tool requiring specific system development package not required in the manylinux image shall be built from this image. For tools that used to be installed in /usr/local, they are staged in /manylinux-rootfs for an easy copy in the third stage. 3. manylinux: This image uses the runtime_base image as a base image. Tools built in the 2nd step are copied directly in the final filesystem. A finalization script is then run to install the remaining python tools/dependencies and run checks.
9c2a018
to
c38b3bc
Compare
Is this ready for final review? |
This one is ready for review. I merged the previous PR without any reviews in order to get things going forward even though I don't like to do this without reviews... |
#965 is next? |
@mattip, yes, I'll merge everything up to building on GHA which will take some time for aarch64/s390x/ppc64le |
thanks! |
This won't change travis-ci build time (at least for now) but allows maintainers/contributors to benefit from docker caching for local developments (faster builds at the expense of higher disk usage)
Round 1
Use docker multi-stage build to build the manylinux image in 3 steps:
runtime_base: this image has all the necessary bits that are common to the build_base image and the manylinux image. This includes system packages required for runtime, the gcc toolchain & some basic tools.
build_base: this image builds all the remaining tools required for the manylinux image. Any tool requiring specific system development package not required in the manylinux image shall be built from this image. For tools that used to be installed in /usr/local, they are staged in /manylinux-rootfs for an easy copy in the third stage.
manylinux: This image uses the runtime_base image as a base image. Tools built in the 2nd step are copied directly in the final filesystem. A finalization script is then run to install the remaining python tools/dependencies and run checks.
This PR builds on top of #876