I’ve been using HASS Core with python for quite a few years now and have been updating my installation with pyenv everytime we have a new Python requirement. This is a simple Ubuntu Server, no rpi.
Up until recently, I’ve fallen behind a couple months with keeping up to date and noticed I gotta upgrade my Python to 11. I was following this blog as a reference every time I upgrade, but then noticed the suggestion to switch to Docker instead in that link.
I’m wondering if I should bother with the change to a container and what I’d be missing out on moving to a container. On the same machine I’m running a variety of local services I access WITH home assistant along with running a few small docker containers already (like zwavejs2mqtt, mqtt, teslamate, etc…). I also query a few machine commands to some local folders that I was thinking may impact that ability, unless I mount them to folders inside the container like the config.
Was curious peoples thoughts, I noticed a lot of switching between supervisor but not a lot about moving away from core and how it would restrict you or be detrimental. I’ve been getting the vibe over the years it’s the least supported thing going forward.
I have been running docker on an x86 debian host for several years and have never been missing anything. It sounds like you already have some familiarity with docker so that is good. Yes there are things that are not part of docker but I honestly think many of these things are for those less comfortable with docker. Again I have never found myself missing anything since running docker and when I update the container all the prerequisites get updated automatically.
Thanks, yeah the updating and not having to login to another user, active pyenv, make a new folder, change sym link, etc… etc… every time python changes is the appeal. Glad to know you’ve been happy with it thus far for a while now.
For what it’s worth I am also running watchtower so as soon as a new container is released my docker gets updated so I am always running the latest version. Some may think this is too risky but again I have never had an issue. I get a notification when my system reboots and provides the version number. I know the update schedule so I always investigate the breaking changes. Now that yaml depreciation has been moved to 6 months this also makes it easier. This is much better than jumping a years worth of breaking changes all at once then surprised when things don’t work.
nothing but all the pain and aggravation of updating everything that is needed to run in a venv.
I used to run in a venv back when that was the only option but then when the ability to run in Docker came along I eventually went that route.
I had a few growing pains but it wasn’t too bad and it wasn’t long before I was comfortable with Docker. After that it was much easier to maintain and there’s no way I’d go back unless there was no other option.
While I won’t deter anybody from using Docker, I would like to share my view and experience. It’s definitely a convenient and flexible option in many ways.
I’ve been running HA Core since I started (about 5 years now).
I find a Python upgrade not too hard. I simply do a Python altinstall from sources, which I can do without shutting down HA. Tearing down and setting up the new venv takes seconds (during which HA needs to be down, of course). Of course, to keep up with your Python versions, you need to install and upgrade certain dev packages and headers. None of that’s an issue, but at some point the host must be upgraded too (this is true for Docker too, so no real difference there).
I find the above much less of a hassle than having to fiddle with paths to access things outside of the container (a highly debatable point, I know, but that’s my preference). Philosophically it also really bothers me, because that then means things aren’t really self-contained anymore, right?
Also, most people will run Docker as root. I’m not doing that, personally. There are some things to consider (and many more posts on this topic) if you don’t want to do that. This matters to me, because I’m not simply accessing attached storage (like a NAS or USB device), plus those devices may not be available or plugged in when you start the container. I have much better control over permissions too (e.g. in the udev rules).