how to run apt-get install libcudnn-cuda-12 on zero?

#96
by guardiancc - opened
ZeroGPU Explorers org
edited Aug 8

I need to manually install this library, which is simple via docker. But with zerogpu and gradio space I need to install in packages.txt, but for some reason the package is not found.

--> FROM docker.io/library/python:3.10.13@sha256:d5b1fbbc00fd3b55620a9314222498bebf09c4bf606425bf464709ed6a79f202
DONE 0.0s

--> RUN apt-get update && apt-get install -y fakeroot &&     mv /usr/bin/apt-get /usr/bin/.apt-get &&     echo '#!/usr/bin/env sh\nfakeroot /usr/bin/.apt-get $@' > /usr/bin/apt-get &&     chmod +x /usr/bin/apt-get && 	rm -rf /var/lib/apt/lists/* && 	useradd -m -u 1000 user
CACHED

--> COPY --chown=1000:1000 --from=root / /
CACHED

--> WORKDIR /home/user/app
CACHED

--> RUN apt-get update && apt-get install -y 	git 	git-lfs 	ffmpeg 	libsm6 	libxext6 	cmake 	rsync 	libgl1-mesa-glx 	&& rm -rf /var/lib/apt/lists/* 	&& git lfs install
CACHED

--> RUN pip install --no-cache-dir pip==22.3.1 && 	pip install --no-cache-dir 	datasets 	"huggingface-hub>=0.19" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1" "pydantic~=1.0" torch==2.2.0
CACHED

--> Restoring cache
DONE 33.8s

--> RUN --mount=target=/tmp/packages.txt,source=packages.txt 	apt-get update && 	xargs -r -a /tmp/packages.txt apt-get install -y && 	rm -rf /var/lib/apt/lists/*
Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8788 kB]
Get:5 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [13.8 kB]
Get:6 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [170 kB]
Fetched 9226 kB in 1s (10.2 MB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package libcudnn9-cuda-12

--> ERROR: process "/bin/sh -c apt-get update && \txargs -r -a /tmp/packages.txt apt-get install -y && \trm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 123
ZeroGPU Explorers org

I'm just guessing based on their documentation, but you may need to follow the instructions for local installation via package manager: https://docs.nvidia.com/deeplearning/cudnn/latest/installation/linux.html#package-manager-local-installation

Something like:

wget https://developer.download.nvidia.com/compute/cuda/repos/$(lsb_release -cs)/x86_64/cuda-$(lsb_release -cs).pin
sudo mv cuda-$(lsb_release -cs).pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/repos/$(lsb_release -cs)/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update

This user experienced a similar error that seemed to be resolved by running with sudo here: https://forums.developer.nvidia.com/t/can-not-install-cudnn-in-ubuntu2204-with-cuda-12-1/273367

I'd be interested to hear how you resolve.

guardiancc changed discussion status to closed

Sign up or log in to comment