6 ms·
Here's a common scenario: you maintain more than one project, and you can't just simultaneously upgrade e.g. Django for all of them (or literally any library wh
by kgrin 10y ago
Here's a common scenario: you maintain more than one project, and you can't just simultaneously upgrade e.g. Django for all of them (or literally any library where an upgrade may be non-trivial).
Yes, eventually you'll (hopefully) upgrade all your projects to the newest and shiniest versions of all your dependencies, but if you need to maintain some semblance of stability, that's not always immediately possible/practical.
- m_mueller 10y agoI'd rather use docker over venv in that case. My host python is for horsing around, when something is to be deployed I document and isolate the dependencies in a dockerfile. venv would only solve half that problem and only for python, not including outside delendencies.
- jjnoakes 10y agoDocker doesn't work if you don't have root.
- mikewhy 10y agoYou need to have access to the docker socket, if you're using sockets to connect. That's not necessarily only root.
- jjnoakes 10y agohttps://news.ycombinator.com/item?id=12291092 https://news.ycombinator.com/item?id=12291092
- m_mueller 10y agoTrue. I also work in a HPC context where that's a problem. That's actually a place where I had to hack together something with venv in order to use an output analysis with a python that's compiled differently from the main Fortran executable. But that's quite an edge case.
- madmax96 10y agoThis is actually wrong. You can be added to the `docker` group. On Docker for OS X you also don't need root.
- jjnoakes 10y agoIn general if a tool requires root to run, of course a system administrator could make some changes to the system to allow a user to run it (adding the user to a privileged group, making the binary setuid, etc). But that's not the point. The point is, if I'm on a system where I don't have the ability to make system-wide changes (run docker as root, add myself to a special group, etc), then I can't run docker on that system.
- pathsjs 10y agoIf the solution to packaging is "I'll use docker", i.e. I will need essentially an entire OS as a dependency of my application, this shows that Python packaging is broken. More sane packaging system allow to define dependencies per project, and only install packages globally when required