安装miniconda、tensorflow、libcudnn

目录

安装miniconda

安装tensorflow

[安装 libcudnn](#安装 libcudnn)


安装miniconda

python 复制代码
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && bash Miniconda3-latest-Linux-x86_64.sh

安装tensorflow

tensorflow官网,查看版本对应

https://tensorflow.google.cn/install?hl=en

python 复制代码
pip install tensorflow-gpu==2.9.0 -i https://pypi.tuna.tsinghua.edu.cn/simple

使用 print(tf.config.list_physical_devices('GPU')) 查看GPU时报错

2024-01-23 14:37:14.298095: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudnn.so.8'; dlerror: libcudnn.so.8: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.7/lib64:/usr/local/cuda-11.7/lib64:/usr/local/cuda-11.7/lib64

2024-01-23 14:37:14.298127: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1850] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.

Skipping registering GPU devices...

安装 libcudnn

报以上错误是因为没有安装cudnn

下载网址:Index of /compute/cuda/repos/ubuntu2004/x86_64 (nvidia.com)

下载命令:

python 复制代码
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/libcudnn8_8.5.0.96-1+cuda11.7_amd64.deb

安装

python 复制代码
sudo dpkg -i libcudnn8_8.5.0.96-1+cuda11.7_amd64.deb

安装成功

相关推荐
LH_R18 小时前
OneTerm开源堡垒机实战(四):访问授权与安全管控
运维·后端·安全
用户311879455921818 小时前
Kylin Linux 10 安装 glib2-devel-2.62.5-7.ky10.x86_64.rpm 方法(附安装包)
linux
Raymond运维18 小时前
MariaDB源码编译安装(二)
运维·数据库·mariadb
涛啊涛19 小时前
Centos7非LVM根分区容量不足后扩容,对调硬盘挂载/
linux·磁盘管理
JuiceFS1 天前
从 MLPerf Storage v2.0 看 AI 训练中的存储性能与扩展能力
运维·后端
CYRUS_STUDIO2 天前
用 Frida 控制 Android 线程:kill 命令、挂起与恢复全解析
android·linux·逆向
熊猫李2 天前
rootfs-根文件系统详解
linux
chen9452 天前
mysql 3节点mgr集群部署
运维·后端
LH_R2 天前
OneTerm开源堡垒机实战(三):功能扩展与效率提升
运维·后端·安全
dessler2 天前
Hadoop HDFS-高可用集群部署
linux·运维·hdfs