mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-02 21:32:31 +08:00
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]
This commit is contained in:
parent
893e76e908
commit
92c42da226
@ -51,6 +51,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& rm cuda-keyring_1.1-1_all.deb
|
&& 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
|
# 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 && \
|
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 && \
|
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
|
# Create symlink for compatibility
|
||||||
RUN ln -sf /usr/local/cuda-12.9 /usr/local/cuda
|
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; \
|
RUN set -e; \
|
||||||
if getent group 1000 >/dev/null 2>&1; then \
|
if getent group 1000 >/dev/null 2>&1; then \
|
||||||
EXISTING_GROUP=$(getent group 1000 | cut -d: -f1); \
|
EXISTING_GROUP=$(getent group 1000 | cut -d: -f1); \
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user