devcontainers / features

A collection of Dev Container Features managed by Dev Container spec maintainers. See https://github.com/devcontainers/feature-starter to publish your own
https://containers.dev/features
MIT License
882 stars 356 forks source link

Version '8.9.5.29-1+cuda12.1' for 'libcudnn8' was not found #718

Open FlatMapIO opened 11 months ago

FlatMapIO commented 11 months ago

It looks like the cudnn install script needs to be changed to accommodate different version combinations.

Here is the discussion: https://forums.developer.nvidia.com/t/e-version-8-3-1-22-1-cuda10-2-for-libcudnn8-was-not-found/200801/30

config file:

{
  "$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json",
  "name": "pytorch-devcontainer",
  "image": "mcr.microsoft.com/devcontainers/base:ubuntu-22.04",
  "features": {
    "ghcr.io/devcontainers/features/nvidia-cuda:1": {
      "cudaVersion": "12.1",

      "installCudnn": true,
      // https://developer.nvidia.com/rdp/cudnn-download
      "cudnnVersion": "8.9.5.29"
    },
}
FlatMapIO commented 11 months ago

I think it is unnecessary to specify the cudnn version externally. I use this method to find the highest matching version:

DISTRO=ubuntu2204
ARCH=x86_64

CUDA_VERSION=${CUDAVERSION:-12.1}

CUDNN_VERSION=$(apt-cache policy libcudnn8 | grep "$CUDA_VERSION" | grep -Eo '^[^-1+]*' | sort -V | tail -n1)
samruddhikhandale commented 11 months ago

Hi 👋

Currently, the nvidia-cuda Feature expects cudaVersion and cudnnVersion to install tools correctly (ensure compatabolity). However, I agree that we should update it to automatically find a compatible version.

@FlatMapIO would you be interested in contributing a PR with the enhancement changes? We'd appreciate that, thanks!

prathameshzarkar9 commented 1 week ago

Hi @samruddhikhandale , Created PR https://github.com/devcontainers/features/pull/1126