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

fix: Reduce feast-server container image size & fix dev image build #4781

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

tchughesiv
Copy link
Contributor

@tchughesiv tchughesiv commented Nov 21, 2024

What this PR does / why we need it:

Improve the Dockerfile to remove unnecessary packages and do some cleanup. This will reduce the current image size by over 300mb.

$ podman images
REPOSITORY                         TAG         IMAGE ID      CREATED        SIZE
quay.io/tchughesiv/feature-server  0.41.3      84dc7acaad64  2 minutes ago  1.04 GB
docker.io/feastdev/feature-server  0.41.3      1bbf34c192d9  3 weeks ago    1.37 GB

This is done by switching to the official python3 debian 11 slim image (python:3.11-slim-bullseye) which handles some of cleanup around python installation. We also tell pip install not to use cache and remove the build-essential package. Finally, we do some additional cleanup around apt.

Additionally, this PR fixes Dockerfile.dev so that it builds local dev changes into a functional container image, as was its intent.

Which issue(s) this PR fixes:

Fixes #4784

@tchughesiv tchughesiv changed the title fix: Reduce feast-server container image size fix: Reduce feast-server container image size & fix dev image Nov 21, 2024
@tchughesiv tchughesiv changed the title fix: Reduce feast-server container image size & fix dev image fix: Reduce feast-server container image size & fix dev image build Nov 21, 2024
@tchughesiv tchughesiv marked this pull request as ready for review November 21, 2024 20:52
@tchughesiv tchughesiv requested a review from a team as a code owner November 21, 2024 20:52
COPY . .
RUN apt update && apt install -y -V ca-certificates lsb-release wget make git curl gcc && \
curl -sL https://deb.nodesource.com/setup_20.x | bash - && \
wget https://apache.jfrog.io/artifactory/arrow/$(lsb_release --id --short | tr 'A-Z' 'a-z')/apache-arrow-apt-source-latest-$(lsb_release --codename --short).deb && \
Copy link
Contributor

Choose a reason for hiding this comment

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

one of these days we should investigate on the reason why these arrow source code bundle for debian is installed.
AFAIK, installing the pyarrow python package is the only thing we need to connect an arrow system.
I will track a GH issue to investigate and in case clear the dockerfile.

Copy link
Contributor

Choose a reason for hiding this comment

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

@franciscojavierarceo franciscojavierarceo merged commit ccc9aea into feast-dev:master Nov 22, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dev feature-server image build not accurate and release build could be improved as well
4 participants