Apt 패키지 수정됨: libcudnn8에서 작동하지 않습니다.

Apt 패키지 수정됨: libcudnn8에서 작동하지 않습니다.

저는 다음과 같은 고정 규칙을 설정했습니다.

Package: cuda
PIN: version 12.1.0-1
Pin-Priority: 9999
 
Package: libcudnn8
PIN: version 8.5.0.96-1+cuda11.7
Pin-Priority: 99999
 
Package: libcudnn8-dev
PIN: version 8.5.0.96-1+cuda11.7
Pin-Priority: 9999

고정된 패키지를 확인하면 다음과 같은 출력이 나타납니다.

/etc/apt/preferences.d$ apt-cache policy
Package files:
 ...
Pinned packages:
     xserver-xorg-video-nouveau -> 1:1.0.17-2build1 with priority 9999
     libnvidia-common-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libnvidia-fbc1-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libnvidia-gl-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libnvidia-extra-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     nvidia-compute-utils-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     nvidia-container-runtime -> 3.12.0-1 with priority 9999
     libnvidia-encode-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     nsight-compute -> 2021.3.1.4~11.5.1-1ubuntu1 with priority -1
     nvidia-utils-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     ubuntu-drivers-common -> 1:0.9.6.1 with priority 9999
     xserver-xorg-video-nvidia-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libvdpau1 -> 1.4-3build2 with priority 9999
     libnvidia-decode-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libnvidia-egl-wayland1 -> 1:1.1.9-1.1 with priority 9999
     docker-ce -> 5:20.10.23~3-0~ubuntu-jammy with priority 9999
     nvidia-kernel-common-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     vdpau-driver-all -> 1.4-3build2 with priority 9999
     telegraf -> 1.25.2-1 with priority 9999
     libnvidia-cfg1-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     nvidia-kernel-source-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libnvidia-compute-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     nsight-systems -> 2021.3.3.2~11.5.1-1ubuntu1 with priority -1
     libcudnn8-dev -> 8.5.0.96-1+cuda11.7 with priority 9999

따라서 위 구성 파일은 libcundnn8-dev 패키지를 성공적으로 고정했지만 libcundd8은 고정하지 않았습니다.

이는 다음 출력으로도 확인됩니다.

/etc/apt/preferences.d$ apt-cache policy libcudnn8
libcudnn8:
  Installed: 8.5.0.96-1+cuda11.7
  Candidate: 8.9.0.131-1+cuda12.1
  Version table:
     8.9.0.131-1+cuda12.1 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  Packages
     8.9.0.131-1+cuda11.8 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  Packages
     8.8.1.3-1+cuda12.0 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  Packages
     8.8.1.3-1+cuda11.8 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  Packages
     8.8.0.121-1+cuda12.0 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  Packages
     8.8.0.121-1+cuda11.8 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  Packages
     8.7.0.84-1+cuda11.8 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  Packages
     8.6.0.163-1+cuda11.8 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  Packages
 *** 8.5.0.96-1+cuda11.7 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  Packages
        100 /var/lib/dpkg/status

내가 뭘 잘못했나요?

편집하다: 본 질문에 파일을 복사할 때 만든 핀 파일의 오타를 수정했습니다. 편집하다:또한 libcudnn8 패키지에 다른 패키지와 동일한 우선순위(9999)를 부여하려고 시도합니다.

답변1

이전에 설치된 CUDA가 구성 파일을 남긴 것으로 나타났습니다. 그것을 제거함으로써

/etc/apt/sources.list.d$ sudo rm cuda-ubuntu2204-12-1-local.list

도움이 되었습니다. 이제 문제의 명령 출력은 다음과 같습니다.

julius@dataspree-MVP-5100:/etc/apt/sources.list.d$ sudo apt-cache policy libcudnn8
libcudnn8:
  Installed: 8.5.0.96-1+cuda11.7
  Candidate: 8.5.0.96-1+cuda11.7
  Version table:
     8.9.0.131-1+cuda12.1 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  Packages
     8.9.0.131-1+cuda11.8 600
        600 https://developer.download.nvidia.com/compute/cuda/repos 
 [ ... ]
/ubuntu2204/x86_64  Packages
 *** 8.5.0.96-1+cuda11.7 9999
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64  Packages
        100 /var/lib/dpkg/status
sudo apt-cache policy
# ...
Pinned packages:
     xserver-xorg-video-nouveau -> 1:1.0.17-2build1 with priority 9999
     libnvidia-common-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libnvidia-fbc1-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libnvidia-gl-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libnvidia-extra-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     nvidia-compute-utils-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     nvidia-container-runtime -> 3.12.0-1 with priority 9999
     libnvidia-encode-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     nsight-compute -> 2021.3.1.4~11.5.1-1ubuntu1 with priority -1
     nvidia-utils-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     ubuntu-drivers-common -> 1:0.9.6.1 with priority 9999
     xserver-xorg-video-nvidia-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libvdpau1 -> 1.4-3build2 with priority 9999
     libnvidia-decode-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libnvidia-egl-wayland1 -> 1:1.1.9-1.1 with priority 9999
     docker-ce -> 5:20.10.23~3-0~ubuntu-jammy with priority 9999
     nvidia-kernel-common-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     vdpau-driver-all -> 1.4-3build2 with priority 9999
     telegraf -> 1.25.2-1 with priority 9999
     libnvidia-cfg1-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     cuda -> 12.1.0-1 with priority 9999
     nvidia-kernel-source-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     libnvidia-compute-525 -> 525.105.17-0ubuntu0.22.04.1 with priority 9999
     nsight-systems -> 2021.3.3.2~11.5.1-1ubuntu1 with priority -1
     libcudnn8 -> 8.5.0.96-1+cuda11.7 with priority 9999
     libcudnn8-dev -> 8.5.0.96-1+cuda11.7 with priority 9999




and the package is no longer listed when performing an `apt update`. 

관련 정보