3 ms·
How do you keep your builds reproducible? I understand that once it's built, a docker image makes that specific build immutable and you can distribute it withou
by iknownothow 4y ago
How do you keep your builds reproducible? I understand that once it's built, a docker image makes that specific build immutable and you can distribute it without worry. However, if you were to run the build stage again i.e. rebuild the docker image and redownload the python packages, without changing any package versions, the resulting docker image *may* be quite different from the previous docker image, even though you haven't changed a single line in the entire repository. This is because the dependencies of dependencies may change. So while this works for you, it's not a general solution for the community. Tools like poetry have solved this problem to a large extent.
- prepend 4y agoNot GP, but I solve this problem by pip freezing a requirements.txt with specific package versions and using that when I do a pip install. I don’t use docker, but probably should. This is pretty reproducible across my own, co-workers, and external collaborators to get the exact version.
- lysecret 4y agoWell the way I mostly solve it is by using the cache from docker. As well as versioning important packages. As well as multiple requirements files. However, i feel like if with every small change to your libraries your code breaks there would be something wrong haha. Also I'm not saying it's a perfect solutions. Only that I had a lot of python apps this was never any issue (an d I had a lot of issues) If you are building a library though, i totally get the point of using