Error de instalación de CentOS nvidia-container-toolkit: no hay ningún paquete disponible

Realice primero el proceso de instalación

1. Configure el repositorio docker-ce:

sudo yum-config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo

2. Instale el paquete containerd.io:

sudo yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.4.3-3.1.el7.x86_64.rpm

3. Instale el paquete de software docker-ce:

sudo yum install docker-ce -y

Asegúrese de que el servicio Docker se esté ejecutando con el siguiente comando:

sudo systemctl --now enable docker

Finalmente, prueba tu instalación de Docker ejecutando el contenedor hello-world:

sudo docker run --rm hello-world

Es normal que se muestre lo siguiente

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

4. Configure el repositorio nvidia-container-toolkit y la clave GPG:

distribution=$(. /etc/os-release;echo $ID$VERSION_ID) && curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.repo | sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo

Agregue la rama experimental a la lista del repositorio:

yum-config-manager --enable libnvidia-container-experimental

5. Instale el paquete nvidia-container-toolkit después de actualizar la lista de paquetes:

sudo yum clean expire-cache
sudo yum install -y nvidia-container-toolkit

Configure el demonio Docker para reconocer el tiempo de ejecución del contenedor NVIDIA:

sudo nvidia-ctk runtime configure --runtime=docker

Después de configurar el tiempo de ejecución predeterminado, reinicie el demonio Docker para completar la instalación:

sudo systemctl restart docker

En este punto, puede probar su configuración de trabajo ejecutando un contenedor CUDA básico:

sudo docker run --rm --runtime=nvidia --gpus all nvidia/cuda:12.1.1-base-centos7 nvidia-smi

Esto debería producir una salida de consola similar a la siguiente:

+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 530.30.02              Driver Version: 530.30.02    CUDA Version: 12.1     |
|-----------------------------------------+----------------------+----------------------+
| GPU  Name                  Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf            Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                                         |                      |               MIG M. |
|=========================================+======================+======================|
|   0  NVIDIA GeForce GTX 1080 Ti      Off| 00000000:01:00.0 Off |                  N/A |
| 20%   38C    P0               57W / 250W|      0MiB / 11264MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|  No running processes found                                                           |
+---------------------------------------------------------------------------------------+

Motivo del error

No se puede instalar en un entorno virtual.

在第4步的储存库地址设置时使用了curl命令
而虚拟环境中的curl和本地源环境所使用的不是一个
所以储存库地址会设置错误
导致找不到nvidia-container-toolkit的软件包

Supongo que te gusta

Origin blog.csdn.net/weixin_46398647/article/details/130492565
Recomendado
Clasificación