Diary of Beets on ARM (Odroid-HC4, Armbian)

I got a sorta NAS device which is arm based. I’m also getting ready for my third, and I hope against hope final, beets database. (Reason for that is for another thread.)

I’m starting ‘from scratch’ on a new platform, which seems like it will work. I will document my progress until it becomes clear I should switch back to x86.

So far (from root, bad habit) :

sudo apt install python3-pip python3-setuptools
pip3 install wheel
pip3 install -U beets
sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
pip install git+https://github.com/x1ppy/freezetag

Pip install on its own failed, probably for armbian related reasons of not including the above tools by default.

beets installed without wheel, but it did note an error. I installed wheel to be safe. As python experts know, the pip version of beets is far more current than whatever is in the Debian / Armbian repo.

https://beets.readthedocs.io/en/latest/faq.html#upgrade-to-the-latest-version-of-beets

I will be moving to linuxserver.io container, managed by portainer. More info as I work.

Mapped a volume with my music so the container can see it. Used a “bind” which has security issues, but at least I did it read only.

apk add git
python3 -m pip install git+https://github.com/JOJ0/beets-dirfields
# make the beets config point to a file I control with Samba
rm /config/config.yaml
ln --symbolic /blk/black/mysys/beets_config.yaml /config/config.yaml

Annoyances:

Don’t want to maintain my own container, so I have to rerun the above commands on every fresh boot. Ideally the container will have months of uptime once it’s all set up. So nbd hopefully.

Need to reset my docker shell every time I restart the container. The ID changes so I can’t just say docker exec -it 8f2563ef7b1d /bin/bash every time. Portainer has a web shell.

edit: perf is starting to be an issue even with a 4 album library. I suspect it’s the slow 25MBps usb port I have my music on. I’m noticing this with calliope.

1 Like

Sorry for the bumps- can’t edit old posts. I think there’s a way to compile edits to a container so I don’t have to keep rerunning this. A project for another day.

alpine linux container instructions

# install dependencies to compile C code on ARM/alpine
# all but git are used for calliope and its dependency on splitstream
apk add git gcc musl-dev python3-dev libc-dev
python3 -m pip install git+https://github.com/JOJ0/beets-dirfields calliope-music m3u8

# make the beets config point to a file I control with Samba
rm /config/config.yaml
ln --symbolic /blk/black/mysys/beet/beets_config.yaml /config/config.yaml

I know this is old, I hate to bump a zombie, and you’ve probably overcome all of this by now, but I wanted to point out a few Docker tips.

First, part of the “linuxserver.io way” is that they support creating custom scripts that run every time the container is restarted.
Docker is meant to not maintain state, but with something like beets where you want to install additional plugins this means having to maintain your own child image. Instead, ls.io has those custom scripts. So you could put those above commands in a script and place it under /custom-cont-init.d.
See Customizing our Containers | LinuxServer.io for more info.

You can also then use the container for development by specifying the beets branch or commit that you want to install. Just be careful about the order you run the commands. I had an issue where I thought I was installing my beets branch, but that was being removed and the latest release was being installed because a later plugin was re-installing beets as a dependency.

If you have a lot of dependencies or ones that require lengthy compilation, it probably is indeed better to inherit from the ls.io image and maintain your changes that way.

As for the ID changing, you can name the container when it starts with --name beets, to avoid having to find the new hash every time.

I also like to use docker-compose to configure containers as it’s a nice way to keep track of how the containers were started and makes it a bit easier to specify what paths are mounted for things like the configuration, database, import and music directories, etc.