Fix GPU on RTX 4060 Ti: CUDA 11.8 + CuPy 13.4 with JIT for sm_89

This commit is contained in:
Antoine Jacquin
2026-05-31 18:34:55 +02:00
parent 89f3333b65
commit e9c48f9ff8

View File

@ -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 DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris ENV TZ=Europe/Paris
@ -46,12 +46,14 @@ RUN pip3 install --no-cache-dir \
cmcrameri cmcrameri
# Install CuPy for GPU acceleration (optional - will fallback to numpy if not available) # 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 # We use CuPy 13.4 (CUDA 11.x wheel) because CuPy 14.x dropped JIT compilation
# GPU architectures not included in the pre-built wheel (e.g. sm_89, sm_120). # support. With CUPY_CUDA_COMPILE_WITH_CACHE=1, CuPy 13.4 compiles kernels at
# The devel image includes nvcc for JIT compilation. If CuPy still fails # runtime for GPU architectures not in the pre-built wheel (e.g. sm_89 / RTX 4060 Ti).
# (CUDA_ERROR_NO_BINARY_FOR_GPU), the pipeline falls back to CPU automatically. # The devel image includes nvcc, required for JIT compilation.
# nvcc stays in PATH for the 'lidar' user.
ENV CUPY_CUDA_COMPILE_WITH_CACHE=1 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 and install the pipeline package
COPY setup.py . COPY setup.py .