Docker image customization and minification #223
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.
Docker image customization and minification
Hello everyone, I made some improvements to Dockerfile and docker-compose, I hope it will be helpful in the community.
What was improved?
10.3GBto7.19GBnvidia/cudaimage from11.3.1-base-ubuntu20.04to11.8.0-base-ubuntu22.04optimizedSDdirectory1.19.2to1.20.3How to use execution customization?
OptimizedSDdirectory, is possible to modify the default execution, by changing the environment variableAPP_MAIN_FILEindocker-compose.ymland doing a new build by running:OPTIMIZED_FILEargument with the following command.docker build --tag newimage --build-arg OPTIMIZED_FILE=optimized_img2img.py .What was not improved?
Wrong: to ensure that the tests do not have side effects, please remove container and docker images related to the project.
Ideas to improve build time in the future
The
venvcould be uploaded to some storage and when building the image download the environment, this will probably be considerably faster than the build step.Positive: The image does not need to go through several steps to build the environment (compression and decompression, downloading packages)
Negative: I would need to update
venvwhenever new dependencies are added to the project