weeklog 2025 Week 31

This week I took an overnight trip to Nagasaki so there was less time for development tasks.

Docker + Python + Rust

After taking some time off from my markdown virtual table project, I decided it was a good time to continue some testing. The challenge is that most of my other projects are deployed as a docker container.

Even though there are a number of Python projects lately that ship modules built with Rust, I have been unable to find a good container base image.

Running the equivilant of curl https://sh.rustup.rs | sh each time I tested results in a LOT of time waiting.

Currently for my testing, I am trying out something like this

# Install uv
FROM python:3.12-slim AS builder
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

# Install Rust
COPY --from=rust:slim /usr/local/cargo /usr/local/cargo
COPY --from=rust:slim /usr/local/rustup /usr/local/rustup
ENV PATH="/usr/local/cargo/bin:${PATH}"
RUN rustup default stable

Though I will likely want to move some of this into a common image that I can more easily reuse.

Most of the rest of my docker image is mostly the same as the uv in docker documentation.

Terminal Hints

After reading an interesting mastodon post I attempted to do the same thing for my own shell. Sadly MacOS does not yet support 24 bit color, so I added a bit of a bodge to my shell settings.

if [[ -z "${COLORTERM}" ]]; then
fortune | lolcat
else
fortune | lolcrab
fi

Spicy Pillow

My iPad pro is a bit more than 6 years old and the battery is finally starting to fail. Early in the morning I noticed the screen was popping up a bit and showing all the signs of a spicy pillow.

Not super excited about needing to replace it, but at the same time after getting 6 years out of it, it is not unexpected.