From e9c48f9ff842546687270a0970d6b56da74d5907 Mon Sep 17 00:00:00 2001 From: Antoine Jacquin Date: Sun, 31 May 2026 18:34:55 +0200 Subject: [PATCH] Fix GPU on RTX 4060 Ti: CUDA 11.8 + CuPy 13.4 with JIT for sm_89 --- Dockerfile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6faaa91..dc4db24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nvidia/cuda:12.4.0-devel-ubuntu22.04 +FROM nvidia/cuda:11.8.0-devel-ubuntu22.04 ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe/Paris @@ -46,12 +46,14 @@ RUN pip3 install --no-cache-dir \ cmcrameri # Install CuPy for GPU acceleration (optional - will fallback to numpy if not available) -# CUPY_CUDA_COMPILE_WITH_CACHE=1 enables JIT compilation of kernels for -# GPU architectures not included in the pre-built wheel (e.g. sm_89, sm_120). -# The devel image includes nvcc for JIT compilation. If CuPy still fails -# (CUDA_ERROR_NO_BINARY_FOR_GPU), the pipeline falls back to CPU automatically. +# We use CuPy 13.4 (CUDA 11.x wheel) because CuPy 14.x dropped JIT compilation +# support. With CUPY_CUDA_COMPILE_WITH_CACHE=1, CuPy 13.4 compiles kernels at +# runtime for GPU architectures not in the pre-built wheel (e.g. sm_89 / RTX 4060 Ti). +# The devel image includes nvcc, required for JIT compilation. +# nvcc stays in PATH for the 'lidar' user. ENV CUPY_CUDA_COMPILE_WITH_CACHE=1 -RUN pip3 install --no-cache-dir cupy-cuda12x || echo "CuPy not available - GPU acceleration disabled" +ENV PATH=/usr/local/cuda/bin:${PATH} +RUN pip3 install --no-cache-dir cupy-cuda11x==13.4.0 || echo "CuPy not available - GPU acceleration disabled" # Copy and install the pipeline package COPY setup.py .