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

Create docker base images #2688

Merged
merged 6 commits into from
Dec 6, 2023
Merged

Create docker base images #2688

merged 6 commits into from
Dec 6, 2023

Conversation

Robert-Steiner
Copy link
Member

@Robert-Steiner Robert-Steiner commented Dec 6, 2023

Issue

Building the server images for non-native platforms (e.g. arm) can take a long time because they run in an emulator. Most of the time is spent installing/compiling python. We want to keep our release CI fast therefore we need to find a way to speed it up.

A python version change will occur less frequently than releasing a new Flower version. The idea is to move this installation to a base image and use that image later when building the server image. This should reduce the build time of the server images. The base image can also be used later for the client images.

Description

This PR moves the installation of system dependencies, python and general python dependencies into its own Dockerfile. This change significantly reduces the build time of the server images. Building the a server images takes now 2 minutes. I restructured the reusable workflow code so that it can be used to build the base and server image.

@Robert-Steiner Robert-Steiner force-pushed the docker-base-image branch 11 times, most recently from ff52b47 to aa26838 Compare December 6, 2023 14:56
@Robert-Steiner Robert-Steiner changed the title Add docker base image Create docker base images Dec 6, 2023
@Robert-Steiner Robert-Steiner force-pushed the docker-base-image branch 2 times, most recently from f75190b to a3491af Compare December 6, 2023 15:22
@Robert-Steiner Robert-Steiner marked this pull request as ready for review December 6, 2023 15:25
@Robert-Steiner Robert-Steiner force-pushed the docker-base-image branch 2 times, most recently from 67e7d72 to 7e2521b Compare December 6, 2023 17:43
secrets:
dockerhub-user: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub-token: ${{ secrets.DOCKERHUB_TOKEN }}

summary:
runs-on: ubuntu-22.04
needs: build-server-images
timeout-minutes: 5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Robert-Steiner Should we increase this to 10min to give a bit more time in case the CI is slow due to e.g. bad network speed? I believe 10min is still acceptable for these jobs. Feel free to keep it at 5 if you think it's reasonable.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can increase it to 10 to be on the safe side.

@tanertopal tanertopal enabled auto-merge (squash) December 6, 2023 23:54
@tanertopal tanertopal merged commit 0bbe430 into main Dec 6, 2023
27 checks passed
@tanertopal tanertopal deleted the docker-base-image branch December 6, 2023 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants