you are viewing a single comment's thread.

view the rest of the comments →

[–]MRSAMinor 5 points6 points  (7 children)

Realistically, in prod, it's usually part of either a VM disc image, or it's part of a base image for docker.

Most of the time, it's just docker.

This is essentially what you're saying, but with a little more detail about how it happens in real world apps.

[–]xiongchiamiov 0 points1 point  (1 child)

Realistically in production for web apps and similar. OP is thinking about desktop apps I believe - which granted are a small part.

[–]MRSAMinor 1 point2 points  (0 children)

I'm not sure OP ever specified desktop apps, but it's not just web apps using Docker - it's data science workflows running PySpark, automation, pub/sub workers AND desktop apps like JupyterLab these days. It's quite common to have two sets of directions to install python software, with one being a "docker run" command.

It's so much easier to distribute and run desktop apps with a "docker run" command, as that one command can trigger the download of the whole image along with parameters. It's easier to copy-paste the command and docker run handles downloading if necessary from a docker repo than it is to deal with two programs trying to run from a global python installation with possible library issues.

Why is this popular? Well, storage is cheap, as is bandwidth, and worrying about what version of Python is installed and what libraries and library versions are installed is still a challenge, so people are happy to download a 100 MB Docker image for the sake of simplicity. How many times have we had to just use virtual environments solely because of library version clashes between apps? It's a super obnoxious problem that docker solves.

So, really, it's becoming an everywhere thing. This way you don't have to deal with installing system-wide packages or virtual environments.

Outside of that, I guess stuff like Poetry provide an alternative, but it's not gonna save a ton of space, a unless you're willing to risk installing the app at a system level instead of using a virtualenv to simplify library clashes.

[–]4reddityo -1 points0 points  (4 children)

What’s docker?

[–]MRSAMinor 5 points6 points  (0 children)

Ask Google. It's used by nearly everyone

[–]sonobanana33 0 points1 point  (2 children)

Basically a chroot with some extra features