Notes for January 6-12

Work was a bit slow this week (it felt more like a half-week as people started popping back in), so I was able to keep a clear head and ended up doing a fair bit of writing for a change–bits of it will be surfacing in the next few hours or weeks.

Going Paperless

After a conversation with friends, I installed paperless-ngx on my NAS and set it up to import documents via an SMB share that anyone can drop files into.

After over a hundred PDFs, I’ve found the built-in classifier (which is old-style, reliable ML) to be pretty much spot on, so I haven’t seen the need to add an LLM to the mix using paperless-ai just yet.

So far, the nicest iOS companion app I’ve found is swift-paperless, which lets me do tag and correspondent management from the couch–but since one of the main reasons I installed Paperless is that I want to batch scan old documents that are still around taking up shelf space, I see a lot of fiddling with Preview and my scanner’s document feeder in the future (and am already planning to whip up some scripts to merge front and back page scans from separate batches).

Cleaning up Portainer

While I was setting things up, I also decided to move most of my /Portainer stacks into my local instance for proper version control (I had a mishmash of stuff that is still managed via ssh as well, and some of them went straight there).

One of the main reasons for this cleanup was that I realized that ArchiveBox’s PDF snapshotting was timing out after being automatically upgraded to 0.7.3, and it was still running under Synology’s container management tool–so I had to convert the entire thing to a docker-compose stack to be able to easily revert to 0.7.1 and 0.7.2 and bisect the bug.

Although I rely on watchtower to keep most of my containers up-to-date and am pretty happy with it, I’ve had a few instances of updates breaking things–litellm also had issues with an update this week, so being able to go into Gitea and pin it to main-v1.57.0 while also documenting why in git is a definite plus.

Also, on the topic of watchtower, I’m a little annoyed that it can’t restart containers on a schedule (besides updating them), so I’ve adopted the following docker-compose snippet, which feels a little ham-fisted but ends up working beautifully:

services:
  myservice:
    container_name: myservice

  restarter:
    image: docker:cli
    restart: unless-stopped
    volumes: ["/var/run/docker.sock:/var/run/docker.sock"]
    entrypoint: ["/bin/sh","-c"]
    command:
      - |
        while true; do
          current_epoch=$$(date +%s)
          target_epoch=$$(( $$(date -d "05:00" +%s) + 86400 ))
          sleep_seconds=$$(( target_epoch - current_epoch ))
          echo "$$(date) + $$sleep_seconds seconds"
          sleep $$sleep_seconds

          docker restart myservice
        done

I’ve also been setting up a new remote development environment–a -themed 41 LXC container, but the console wasn’t working until I added this to the config to ensure the console was activated and it exposed the right device to the container:

console: 1
cmode: console

I was a bit surprised that xfce4-appmenu-plugin seems to have been dropped from the Fedora repositories (I understand that Linux folk aren’t keen on top-level menu bars, but it’s still sad), and I’m looking for a way to reinstate it somehow.

Random Stuff

On the front, it seems to finally be working out for me, albeit with the caveat that I still don’t like the resulting (so I am running the output through my own linting scripts when I publish drafts).

On the hardware front, I ordered more electronics parts–hopefully not to add to the small pile already lingering around my soldering station–and went down a couple of rabbit holes around getting ollama to run on older Radeon GPUs so I can re-use existing hardware on a project.

This page is referenced in: