Improve docker container rebuild speed #1623
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Title
This pull request improve docker container improve process for development.
Description
Before:
Every change in codebase triggered poetry to install all requirements again since
ADD . .
and docker cache layer break.After
New approach it to do installation in two steps
Copy dependecy locak files and do poetry isntall to install dependecies. Now only changes in
poetry.lock
orpyproject.toml
will trigger poetry to install these dependecies again. In all other cases docker will use cached layer
Install package itself with
poetry install
Related Issue
This fix the following issue
#1622
Motivation and Context
It improve speed for docker container rebuild
How Has This Been Tested?
Tested locally with the following command
docker build -t spotdl .
Screenshots (if appropriate)
Before the change
After the change
Types of Changes
Checklist