Docker - MQTT and installing dependencies

I’ve been running hassbian for a while on my pi but i’m exploring running HASS in docker on another machine. I’ve gotten most things working but hitting 2 snags I could use help on:

First, I run this script (Anova sous vide cooker control) to control my Anova sous vide machine. To run the script, I need to run “pip3 install -e .” to install the anova dependencies. I’ve figured out a way to install it via Portainer but that’s not automatic. Maybe I could do a shell command and set up an automation to fire on HASS restart? Or do I need to do something with the docker container?

Second, I’m looking to move to MQTT in docker. Currently i have a username/password set up. Not seeing a way to do that in Docker. Is this something that can be done, or do I really even need to do it if the broker isn’t going to be accessible outside the network?

“installation for development”
It would appear that is only needed for development?

You don’t install things in a running container.
Personally for this particular thing, since it is just running a script, is install your requirements in another docker container and run it through that, or run it directly on the host. You could build your own docker image, based on Home Assistant docker image that injects that python script into it, or you could just make it a custom component instead so it will handle its own dependencies.

It’s pretty easy actually.

I don’t use a user/pass on mine since it’s inaccessible from outside my LAN

Thanks.

Nope, I get errors saying it can’t run the script until I install the dependencies. I think I got it working with a shell script, will see. I thought about building my own docker container for hass but that felt beyond my abilities atm.

In terms of MQTT, yeah I figured it out. The docker image doesn’t support password generation so I found another work around.