Skip to content

CUDA image fails to load ONNX Runtime due to outdated CUDNN/CUDA versions #32

@ss1gohan13

Description

@ss1gohan13

Problem Description

When running the ghcr.io/imagegenius/obico:cuda container, I'm getting errors that indicate the CUDA version is incompatible with the current ONNX Runtime requirements.

Error Message

[E:onnxruntime:Default, provider_bridge_ort.cc:2195 TryGetProviderInfo_CUDA] /onnxruntime_src/onnxruntime/core/session/provider_bridge_ort.cc:1778 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcudnn.so.9: cannot open shared object file: No such file or directory

[W:onnxruntime:Default, onnxruntime_pybind_state.cc:1055 CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Require cuDNN 9.* and CUDA 12.*. Please install all dependencies as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.

Analysis

Looking at the Dockerfile in the CUDA branch, I can see that it's currently installing CUDNN 8.2.4 for CUDA 11.4:

curl -o /tmp/libcudnn.deb -L https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/libcudnn8_8.2.4.15-1+cuda11.4_amd64.deb

However, the latest ONNX Runtime now requires:

  • CUDNN 9.*
  • CUDA 12.*

Possible Solutions

Either:

  1. Pin the ONNX Runtime version to one compatible with CUDA 11.4 and CUDNN 8 (like onnxruntime-gpu==1.14.1)
  2. Update the Dockerfile to install CUDA 12.x and CUDNN 9.x

Since ONNX Runtime is regularly updated and may have important fixes and improvements, option 2 would be preferable for a long-term solution.

Additional Information

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions