Skip to content

Comments

feat: add container support#52

Open
0xDEC0DE wants to merge 3 commits intogeekscape:masterfrom
0xDEC0DE:docker
Open

feat: add container support#52
0xDEC0DE wants to merge 3 commits intogeekscape:masterfrom
0xDEC0DE:docker

Conversation

@0xDEC0DE
Copy link

Add a Dockerfile and a docker-compose.yaml to allow for easier spin-up and development of a sandboxed environment

Uses uv in lieu of pip for installing Python packages because uvs installer is (much) faster and has a (much) better solver

fix: update dependency versions

Move away from Hatch's "most-compatible version" notation to using plain minimum-version notation with explicit upper-bounds where needed to mitigate breaking changes

@0xDEC0DE
Copy link
Author

0xDEC0DE commented Jan 13, 2026

Pros

  • Super simple to set up
  • Highly reproducible
  • Excellent sandboxing — can wildly experiment without worrying about trashing the local system
  • Local vs. "public" MQTT server is dead simple to configure
  • Moves "network performance as a bottleneck" to the setup phase only
  • The built image can be pushed to Docker Hub, and subsequently be used without needing to build anything

Cons

  • Requires Docker/containerd/etc. which can be intimidating
  • Excellent sandboxing — changes inside the container will be lost unless explicitly saved, and changes outside the container (may) require a rebuild to be used at all
  • If pushing to Docker Hub, Intel and ARM architectures will need to be built and pushed
  • The built ARM image is ~1GB compressed, which may be a lot to ask of a fragile public library wifi connection
  • The built Intel image is ~5GB compressed, due to the Nvidia CUDA drivers
  • Building the image is similarly onerous, needing to fetch gigabytes of data from Debian, PyPI, and GitHub

Add a `Dockerfile` and a `docker-compose.yaml` to allow for easier
spin-up and development of a sandboxed environment

Uses `uv` in lieu of `pip` for installing Python packages because
`uv`s installer is (much) faster and has a (much) better solver

fix: update dependency versions

Move away from Hatch's "most-compatible version" notation to using
plain minimum-version notation with explicit upper-bounds where
needed to mitigate breaking changes
@0xDEC0DE
Copy link
Author

So...

The service attempts to bind to on port 5000 on the host, because that is the default value of the Flask development server and I never bothered to change it, however this will NOT run on a Mac "out of the box", because the Airplay Receiver also binds to that port.

I missed this because, like most people that ever do any amount of Flask dev, I turned off the Airplay Receiver years ago and forgot about it. This should move the exposed port to something unused, e.g., 5888.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant