From 92c42da2269e0d10696a1e24806c2440abdce28a Mon Sep 17 00:00:00 2001 From: clsferguson <48876201+clsferguson@users.noreply.github.com> Date: Tue, 30 Sep 2025 12:10:45 -0600 Subject: [PATCH] feat(dockerfile): install latest uv from official distroless image - Copy uv and uvx from ghcr.io/astral-sh/uv:latest into /usr/local/bin to provide a fast package manager at build time without curl, always fetching the newest release. [web:200] - Keeps image GPU-agnostic and improves cold-starts while entrypoint retains pip fallback for robustness in multiuser environments. [web:185] --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 198ef84ed..388420fd1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,6 +51,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && rm -rf /var/lib/apt/lists/* \ && rm cuda-keyring_1.1-1_all.deb +# Install uv (latest) by copying binaries from Astral's official distroless image +COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/ + # Patch CUDA math_functions.h for glibc 2.41 compatibility RUN sed -i 's/extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ double sinpi(double x);/extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ double sinpi(double x) noexcept (true);/' /usr/local/cuda-12.9/include/crt/math_functions.h && \ sed -i 's/extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ float sinpif(float x);/extern __DEVICE_FUNCTIONS_DECL__ __device_builtin__ float sinpif(float x) noexcept (true);/' /usr/local/cuda-12.9/include/crt/math_functions.h && \ @@ -65,7 +68,7 @@ ENV CUDA_HOME=/usr/local/cuda-12.9 \ # Create symlink for compatibility RUN ln -sf /usr/local/cuda-12.9 /usr/local/cuda -# Create runtime user/group (fix the original issue) +# Create runtime user/group RUN set -e; \ if getent group 1000 >/dev/null 2>&1; then \ EXISTING_GROUP=$(getent group 1000 | cut -d: -f1); \