worldveil / dejavu

Audio fingerprinting and recognition in Python
MIT License
6.45k stars 1.44k forks source link

Python Docker image bloated #288

Open evictor opened 1 year ago

evictor commented 1 year ago

Looks like the Docker build hasn't been given a proper refactoring: https://github.com/worldveil/dejavu/blob/master/docker/python/Dockerfile. Noticed this when observing git existing inside a python container, which was unexpected. The DB image should be subject to the same treatment if it hasn't already been visited.

Patterns like multi-stage builds, build cache and other improvements from buildkit, and removal of intermediate or build-only kruft are optimizations that spring to mind.