feast-dev / feast

The Open Source Feature Store for Machine Learning
https://feast.dev
Apache License 2.0
5.62k stars 1k forks source link

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

Open tchughesiv opened 20 hours ago

tchughesiv commented 20 hours ago

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 https://github.com/feast-dev/feast/issues/4784