59
Another reason to love Linux
(beehaw.org)
A nice place to discuss rumors, happenings, innovations, and challenges in the technology sphere. We also welcome discussions on the intersections of technology and society. If it’s technological news or discussion of technology, it probably belongs here.
Remember the overriding ethos on Beehaw: Be(e) Nice. Each user you encounter here is a person, and should be treated with kindness (even if they’re wrong, or use a Linux distro you don’t like). Personal attacks will not be tolerated.
Subcommunities on Beehaw:
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.
Alright, I want two apps that depend on two different version of python, but won't work on the other.
No warning, no notice, just one of the two fails to start. Thank you package manager
venv or nix
These are 2014 problems
Tried both, didn't like 'm, using docker now
Solved problem. Python virtual environments. Or install another python version with your package manager and make sure the python script calls it in the shebang instead of a generic
/usr/bin/env python
.Tried it, but some apps depend on spawning other python processes. Half the time that results in them breaking out of the env cuz they're using the python in the system path
So change the shebang to explicitly reference the venv python.
Ye that's handy, until some script inside a library or something doesn't
So you reported the issue before complaining ?
No I threw it in a docker container
Valid XD
yay python31{0..2}
Or three docker containers
And that's why nix exists.
I tried it, ye. And although I like the concept, I can't say the implementation was to my liking
What didn't you like about it? I am just curious; I finally stepped out of using Debian for everything which I have been doing for approximately 200 years, and tried NixOS, and to me it is incredibly nice the way it solves a lot of these issues.
When I tried it it looked really cool. Up until it just.. didn't work. And then looking around I found a bunch of people giving me better snippets of scripts and it was not helpful
But given I just need docker and nothing more, I did not bother and looked further
Huh.
IDK man, my experience is that Nix solves the problem you originally talked about and a bunch of others, pretty effectively. Among other things if things "just... don't work" you can trivially roll back to an earlier working config, and see what changed between working and not-working, and so what would be a pretty grueling debugging process in some other environment becomes pretty easy to sort out.
But whatever. If for some reason Docker makes you more happy and not less, you're welcome to it and best of luck.
Perhaps it's improved over the last year, I can give it a shot. But yes, for my own packaged applications without shared dependencies, docker is handy. And that's exclusively what I run
I mean if it makes you happy, I won't tell you to do anything different. I think a certain amount of it is just prejudice against Docker on my part. Just in my experience NixOS is the best of both worlds: You can have a single coherent system if everything in that system can play nice with each other, and if not, then things can be containerized completely that way still works too. And then on top it has a couple of other nice features like rolling back configs easily, or source builds that get slotted in in-place as if they were standard packages (which is generally where I abandon Docker installs of things, because making changes to the source seems like it's going to be a big hassle).
I'm not trying to evangelize though, you should in all seriousness just do what you find to be effective.
Hold up, nix added containerization? How did I miss that? I will have another look now!
Also, you're right. For small quick scripts docker can be a hassle. Nowadays though I add building a docker image as part of my project's build/compilation process. The main reason I do this is so that I can work with whatever machine I happen to be on, then just copy paste the app to whatever machine I want it on. No extra config or even a look at the environment required. Just install docker and forget about the rest
update: installing docker on nixos (on a vm) with a nix package failed, not sure why. Perhaps some dependencies were no longer available?
update: nix is is available as a docker image. I'm running it now, we shall see how it goes