paulwong

          國(guó)內(nèi)網(wǎng)絡(luò)環(huán)境安裝docker+container toolkit

          操作系統(tǒng)為centos 9.

          先安裝驅(qū)動(dòng)程序

          https://www.nvidia.cn/drivers/lookup/ 中查找對(duì)應(yīng)的驅(qū)動(dòng)程序下載到本地,再運(yùn)行
          #切換成文字界面
          sudo systemctl set-default multi-user.target
          sudo reboot

          sh NVIDIA
          -Linux-x86_64-550.107.02.run

          #切換成圖形界面
          sudo systemctl set-default graphical.target
          sudo reboot

          安裝docker:

          yum remove docker \
                            docker-client \
                            docker-client-latest \
                            docker-common \
                            docker-latest \
                            docker-latest-logrotate \
                            docker-logrotate \
                            docker-engine

          yum install -y yum-utils
          yum-config-manager --add-repo https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo
          sed -i 's+https://download.docker.com+https://mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo

          yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

          sudo nvidia-ctk runtime configure --runtime=docker

          改鏡像地址:

          [paul@paul-pc ~]$ cat /etc/docker/daemon.json
          {  
              
          "registry-mirrors"[
                  "http://xxx.xxx.xxx"
              ]
          ,
              
          "runtimes": {
                  
          "nvidia": {
                      
          "args"[],
                      
          "path""nvidia-container-runtime"
                  }
              }
          }

          安裝container-took-kit:

          https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=Rocky&target_version=9&target_type=runfile_local 中找到對(duì)應(yīng)的container-took-kit,下載到本地,再運(yùn)行
          sh cuda_12.6.0_560.28.03_linux.run

          驗(yàn)證:

          sudo docker run --rm -it --gpus all ubuntu  nvidia-smi
          +-----------------------------------------------------------------------------------------+
          | NVIDIA-SMI 550.107.02             Driver Version: 550.107.02     CUDA Version: 12.4     |
          |-----------------------------------------+------------------------+----------------------+
          | 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 RTX 2080 Ti     Off |   00000000:01:00.0  On |                  N/A |
          | 62%   36C    P8              4W /  260W |     256MiB /  22528MiB |      1%      Default |
          |                                         |                        |                  N/A |
          +-----------------------------------------+------------------------+----------------------+
          |   1  NVIDIA GeForce RTX 2080 Ti     Off |   00000000:02:00.0 Off |                  N/A |
          | 64%   35C    P8              5W /  260W |       9MiB /  22528MiB |      0%      Default |
          |                                         |                        |                  N/A |
          +-----------------------------------------+------------------------+----------------------+
                                                                                                   
          +-----------------------------------------------------------------------------------------+
          | Processes:                                                                              |
          |  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
          |        ID   ID                                                               Usage      |
          |=========================================================================================|
          |    0   N/A  N/A      2657      G   /usr/libexec/Xorg                              99MiB |
          |    0   N/A  N/A      2735      G   /usr/bin/gnome-shell                           38MiB |
          |    0   N/A  N/A      3502      G   /usr/lib64/firefox/firefox                    111MiB |
          |    1   N/A  N/A      2657      G   /usr/libexec/Xorg                               4MiB |
          +-----------------------------------------------------------------------------------------+
          參考地址:
          https://mirrors.tuna.tsinghua.edu.cn/help/docker-ce/

          posted on 2024-08-15 10:49 paulwong 閱讀(167) 評(píng)論(0)  編輯  收藏 所屬分類: DOCKER

          主站蜘蛛池模板: 托克托县| 临朐县| 塘沽区| 青浦区| 德化县| 云和县| 根河市| 桐乡市| 灵台县| 曲周县| 兴隆县| 望奎县| 临泉县| 睢宁县| 怀宁县| 安陆市| 沾化县| 宝应县| 禹州市| 东至县| 淮安市| 出国| 敖汉旗| 武功县| 米易县| 如皋市| 乐山市| 长宁区| 通海县| 沂水县| 桓仁| 哈尔滨市| 迭部县| 怀宁县| 开远市| 神木县| 西藏| 克东县| 明水县| 江山市| 恩平市|