From 19ea65cae88b699471b2269bd83aa93918f1c4d9 Mon Sep 17 00:00:00 2001 From: Bernard Siebens Date: Sun, 23 Aug 2026 18:25:43 +0200 Subject: [PATCH] Widen uv's bytecode-compile timeout to fix the Docker build uv sync --compile-bytecode enforces a hardcoded 60s-per-file cap, and phonenumbers' generated geodata/data*.py files (large literal dicts, not slow code) blow past it on a slower builder even though nothing's actually hung -- widen the cap via UV_COMPILE_BYTECODE_TIMEOUT rather than dropping UV_COMPILE_BYTECODE entirely, which would just move that same compile cost to every cold container start instead of paying it once at build time. Co-Authored-By: Claude Sonnet 5 --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index ad2bf87..0b34af4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,14 @@ RUN apt-get update && apt-get install --no-install-recommends -y git ca-certific COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv +# uv's own bytecode-compile step has a hardcoded 60s-per-file cap, and +# phonenumbers' generated geodata/data*.py files (large literal dicts, not +# slow code) are known to blow past it on a slower builder even though +# nothing's actually hung -- widen the cap rather than dropping +# UV_COMPILE_BYTECODE entirely, which would just move that same compile cost +# to every cold container start instead of paying it once here. ENV UV_COMPILE_BYTECODE=1 \ + UV_COMPILE_BYTECODE_TIMEOUT=300 \ UV_LINK_MODE=copy \ UV_PYTHON_DOWNLOADS=never