linux deepin 23 下cuda11.2和paddlepaddle2.3.2-gpu安装

简介: linux deepin 23 下cuda11.2和paddlepaddle2.3.2-gpu安装

1.cuda/cudnn 安装


(base) ken@ken-gaint:/media/ken/blank/linux-cuda-cudnn$ ls -la
总用量 4777701
drwxrwxrwx 1 ken ken        568  8月 27 21:38 .
drwxrwxrwx 1 ken ken      65536  8月 27 13:02 ..
-rwxrwxrwx 2 ken ken 3046790184  5月 21 16:07 cuda_11.2.0_460.27.04_linux.run
-rwxrwxrwx 2 ken ken 1845502929  5月 21 18:22 cudnn-11.3-linux-x64-v8.2.0.53.tgz
  • cuda直接安装
  • cudnn直接解压缩到安装目录
/usr/local/cuda-11.2


2.paddlepaddle-gpu安装


  • 虚拟环境创建
  • 清华源设置
  • 虚拟环境创建
  • paddlepaddle包安装
wget https://tuna.moe/oh-my-tuna/oh-my-tuna.py
# For yourself
python oh-my-tuna.py
# ...or for everyone!
sudo python  oh-my-tuna.py --global
# Get some help
**python** oh-my-tuna.py -h
(base) ken@ken-gaint:~/Downloads$ conda create -n p2 python=3.9
Collecting package metadata (current_repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
  current version: 4.9.2
  latest version: 4.14.0
Please update conda by running
    $ conda update -n base -c defaults conda
## Package Plan ##
  environment location: /home/ken/miniconda3/envs/p2
  added / updated specs:
    - python=3.9
The following packages will be downloaded:
    package                    |            build
    ---------------------------|-----------------
    _libgcc_mutex-0.1          |             main           3 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    _openmp_mutex-5.1          |            1_gnu          21 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    ca-certificates-2022.07.19 |       h06a4308_0         124 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    certifi-2022.6.15          |   py39h06a4308_0         153 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    ld_impl_linux-64-2.38      |       h1181459_1         654 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    libffi-3.3                 |       he6710b0_2          50 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    libgcc-ng-11.2.0           |       h1234567_1         5.3 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    libgomp-11.2.0             |       h1234567_1         474 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    libstdcxx-ng-11.2.0        |       h1234567_1         4.7 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    ncurses-6.3                |       h5eee18b_3         781 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    openssl-1.1.1q             |       h7f8727e_0         2.5 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    pip-22.1.2                 |   py39h06a4308_0         2.5 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    python-3.9.12              |       h12debd9_1        19.2 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    readline-8.1.2             |       h7f8727e_1         354 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    setuptools-63.4.1          |   py39h06a4308_0         1.1 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    sqlite-3.39.2              |       h5082296_0         1.1 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    tk-8.6.12                  |       h1ccaba5_0         3.0 MB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    tzdata-2022a               |       hda174b7_0         109 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    wheel-0.37.1               |     pyhd3eb1b0_0          33 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    xz-5.2.5                   |       h7f8727e_1         339 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    zlib-1.2.12                |       h7f8727e_2         106 KB  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
    ------------------------------------------------------------
                                           Total:        42.4 MB
The following NEW packages will be INSTALLED:
  _libgcc_mutex      anaconda/pkgs/main/linux-64::_libgcc_mutex-0.1-main
  _openmp_mutex      anaconda/pkgs/main/linux-64::_openmp_mutex-5.1-1_gnu
  ca-certificates    anaconda/pkgs/main/linux-64::ca-certificates-2022.07.19-h06a4308_0
  certifi            anaconda/pkgs/main/linux-64::certifi-2022.6.15-py39h06a4308_0
  ld_impl_linux-64   anaconda/pkgs/main/linux-64::ld_impl_linux-64-2.38-h1181459_1
  libffi             anaconda/pkgs/main/linux-64::libffi-3.3-he6710b0_2
  libgcc-ng          anaconda/pkgs/main/linux-64::libgcc-ng-11.2.0-h1234567_1
  libgomp            anaconda/pkgs/main/linux-64::libgomp-11.2.0-h1234567_1
  libstdcxx-ng       anaconda/pkgs/main/linux-64::libstdcxx-ng-11.2.0-h1234567_1
  ncurses            anaconda/pkgs/main/linux-64::ncurses-6.3-h5eee18b_3
  openssl            anaconda/pkgs/main/linux-64::openssl-1.1.1q-h7f8727e_0
  pip                anaconda/pkgs/main/linux-64::pip-22.1.2-py39h06a4308_0
  python             anaconda/pkgs/main/linux-64::python-3.9.12-h12debd9_1
  readline           anaconda/pkgs/main/linux-64::readline-8.1.2-h7f8727e_1
  setuptools         anaconda/pkgs/main/linux-64::setuptools-63.4.1-py39h06a4308_0
  sqlite             anaconda/pkgs/main/linux-64::sqlite-3.39.2-h5082296_0
  tk                 anaconda/pkgs/main/linux-64::tk-8.6.12-h1ccaba5_0
  tzdata             anaconda/pkgs/main/noarch::tzdata-2022a-hda174b7_0
  wheel              anaconda/pkgs/main/noarch::wheel-0.37.1-pyhd3eb1b0_0
  xz                 anaconda/pkgs/main/linux-64::xz-5.2.5-h7f8727e_1
  zlib               anaconda/pkgs/main/linux-64::zlib-1.2.12-h7f8727e_2
############
############
############
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate p2
#
# To deactivate an active environment, use
#
#     $ conda deactivate
(base) ken@ken-gaint:~/Downloads$ conda activate p2
############
############
(p2) ken@ken-gaint:~/Downloads$ python oh-my-tuna.py 
############
############
(p2) ken@ken-gaint:~/Downloads$ python -m pip install paddlepaddle-gpu==2.3.2.post112 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Looking in links: https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html
Collecting paddlepaddle-gpu==2.3.2.post112
  Downloading https://paddle-wheel.bj.bcebos.com/2.3.2/linux/linux-gpu-cuda11.2-cudnn8-mkl-gcc8.2-avx/paddlepaddle_gpu-2.3.2.post112-cp39-cp39-linux_x86_64.whl (396.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 396.0/396.0 MB 1.2 MB/s eta 0:00:00
Collecting decorator
############
############

然后这样是失败的。。。

(p2) ken@ken-gaint:/media/ken/blank/linux-cuda-cudnn$ python
Python 3.9.12 (main, Jun  1 2022, 11:38:51) 
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import paddle
Error: Can not import avx core while this file exists: /home/ken/miniconda3/envs/p2/lib/python3.9/site-packages/paddle/fluid/core_avx.so
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ken/miniconda3/envs/p2/lib/python3.9/site-packages/paddle/__init__.py", line 25, in <module>
    from .framework import monkey_patch_variable
  File "/home/ken/miniconda3/envs/p2/lib/python3.9/site-packages/paddle/framework/__init__.py", line 17, in <module>
    from . import random  # noqa: F401
  File "/home/ken/miniconda3/envs/p2/lib/python3.9/site-packages/paddle/framework/random.py", line 16, in <module>
    import paddle.fluid as fluid
  File "/home/ken/miniconda3/envs/p2/lib/python3.9/site-packages/paddle/fluid/__init__.py", line 36, in <module>
    from . import framework
  File "/home/ken/miniconda3/envs/p2/lib/python3.9/site-packages/paddle/fluid/framework.py", line 37, in <module>
    from . import core
  File "/home/ken/miniconda3/envs/p2/lib/python3.9/site-packages/paddle/fluid/core.py", line 298, in <module>
    raise e
  File "/home/ken/miniconda3/envs/p2/lib/python3.9/site-packages/paddle/fluid/core.py", line 256, in <module>
    from . import core_avx
ImportError: /home/ken/miniconda3/envs/p2/lib/python3.9/site-packages/paddle/fluid/core_avx.so: undefined symbol: _dl_sym, version GLIBC_PRIVATE
>>> 


3.正确的办法


www.paddlepaddle.org.cn/documentati…

直接下载gcc8,然后自己编译。。。我哭晕了。


相关实践学习
部署Stable Diffusion玩转AI绘画(GPU云服务器)
本实验通过在ECS上从零开始部署Stable Diffusion来进行AI绘画创作,开启AIGC盲盒。
目录
相关文章
|
1月前
|
Linux
手把手教会你安装Linux系统
手把手教会你安装Linux系统
|
1月前
|
安全 关系型数据库 MySQL
Linux下安装mysql8.0(以tar.xz包安装--编译安装)
通过上述步骤,您完成了从下载、编译、安装到配置MySQL 8.0的全过程。此过程虽然较为复杂,但提供了对MySQL安装环境的完全控制,有助于满足特定的部署需求。在实际操作中,根据具体的系统环境,可能还需调整部分步骤或解决未预见的依赖问题。始终参考官方文档和社区资源,保持安装过程与最新版本的兼容性。
776 67
|
1月前
|
Linux 测试技术 网络安全
Linux系统之安装OneNav个人书签管理器
【10月更文挑战第19天】Linux系统之安装OneNav个人书签管理器
112 5
Linux系统之安装OneNav个人书签管理器
|
1月前
|
监控 Java Linux
Linux系统之安装Ward服务器监控工具
【10月更文挑战第17天】Linux系统之安装Ward服务器监控工具
55 5
Linux系统之安装Ward服务器监控工具
|
15天前
|
存储 安全 数据管理
如何在 Rocky Linux 8 上安装和配置 Elasticsearch
本文详细介绍了在 Rocky Linux 8 上安装和配置 Elasticsearch 的步骤,包括添加仓库、安装 Elasticsearch、配置文件修改、设置内存和文件描述符、启动和验证 Elasticsearch,以及常见问题的解决方法。通过这些步骤,你可以快速搭建起这个强大的分布式搜索和分析引擎。
32 5
|
1月前
|
JSON JavaScript Linux
Linux系统之安装cook菜谱工具
【10月更文挑战第15天】Linux系统之安装cook菜谱工具
38 2
Linux系统之安装cook菜谱工具
|
1月前
|
Ubuntu Linux 测试技术
Linux系统之Ubuntu安装cockpit管理工具
【10月更文挑战第13天】Linux系统之Ubuntu安装cockpit管理工具
143 4
Linux系统之Ubuntu安装cockpit管理工具
|
1月前
|
Linux 网络安全 数据安全/隐私保护
Linux系统之Centos7安装cockpit图形管理界面
【10月更文挑战第12天】Linux系统之Centos7安装cockpit图形管理界面
91 1
Linux系统之Centos7安装cockpit图形管理界面
|
1月前
|
存储 Oracle 关系型数据库
|
1月前
|
Linux Shell 异构计算
在linux上部署yolov5和安装miniconda3
这篇文章介绍了在Linux系统上部署YOLOv5并安装Miniconda3的步骤,包括使用wget命令下载Miniconda安装脚本、安装Miniconda、初始化Conda环境、添加镜像源等。
91 3
在linux上部署yolov5和安装miniconda3
下一篇
无影云桌面