安装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

安装成功

相关推荐
爱莉希雅&&&4 分钟前
zabbix快速搭建和使用
android·linux·数据库·zabbix·监控
z2005093011 分钟前
【linux学习】深入理解linux文件I/O,从C标准库到内核态
linux·学习·操作系统
黑泽明Coding30 分钟前
使用密钥登录ssh
运维·ssh
J2虾虾39 分钟前
Spring AI Alibaba - Tools
服务器·人工智能·spring
weixin_307779131 小时前
面向高性能保密计算的定制 Linux 系统构建与自动部署方案
linux·安全·网络安全·性能优化·系统安全
着迷不白1 小时前
五、文本处理工具+正则表达式
linux·运维·服务器
卡次卡次11 小时前
vibecoding起步注意点:插件、Skills、MCP、Hooks
服务器·数据库·python·oracle
Elastic 中国社区官方博客1 小时前
每次操作一个 API 调用:Elastic Cloud Hosted 如何让大规模部署管理变得可行
大数据·运维·数据库·elasticsearch·搜索引擎·serverless
载数而行5201 小时前
Linux 4常用指令(文件/时间/搜索查找/压缩解压指令)
linux
和舒貌2 小时前
【无标题】
服务器