From ba8306e7aea8150f0843c855c1112faebc11698c Mon Sep 17 00:00:00 2001 From: Tony Hernandez <9831944+TonyHernandezAtMS@users.noreply.github.com> Date: Sun, 16 Nov 2025 14:47:05 -0600 Subject: [PATCH] fix: mount .local/share to persist uv-managed Python installations Fixes broken Python venv symlinks after container restarts. Problem: When uv creates a venv with --python-preference managed, it downloads Python to ~/.local/share/uv/python/. The venv contains symlinks pointing to this location. However, this directory was not mounted, causing the Python installation to be lost when containers exit, leaving broken symlinks. This bug was introduced in commit 57fa079 (July 17, 2025) when Python installation was moved from Docker build-time to runtime with the entrypoint flag system. Solution: Mount PROJECT_SLOT_DIR/.local/share to persist uv-downloaded Python installations across container restarts. Affects: python, ml, and datascience profiles Testing: - Clean project and add python profile - Verify Python 3.14 downloads and installs successfully - Restart container and verify Python still works - Confirm ~/.local/share/uv/python/ persists on host --- lib/docker.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/docker.sh b/lib/docker.sh index 3e3fb50..56b2a5c 100755 --- a/lib/docker.sh +++ b/lib/docker.sh @@ -239,6 +239,11 @@ run_claudebox_container() { # Mount .cache directory docker_args+=(-v "$PROJECT_SLOT_DIR/.cache":/home/$DOCKER_USER/.cache) + # Mount .local/share for uv-managed Python installations + # uv downloads Python to ~/.local/share/uv/python/ which must persist across containers + mkdir -p "$PROJECT_SLOT_DIR/.local/share" + docker_args+=(-v "$PROJECT_SLOT_DIR/.local/share":/home/$DOCKER_USER/.local/share) + # Mount SSH directory docker_args+=(-v "$HOME/.ssh":"/home/$DOCKER_USER/.ssh:ro")