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

安装成功

相关推荐
肥胖小羊1 小时前
微信社群自动化管理与防骚扰系统的设计与实现
运维·自动化
AI办公探索者2 小时前
仓储物流AI任务执行的技术拆解:从WMS自动化到多设备协同的落地路径
运维·人工智能·ai·自动化
longerxin20203 小时前
nano编辑器插入、编辑完整操作教程(Linux日志/配置专用)
linux·运维·编辑器
cesium vue4 小时前
nginx 流媒体配置
运维·nginx
木心术14 小时前
GitHub Actions自动化运维实战:从CI/CD到全链路DevOps
运维·自动化·github
糯米导航4 小时前
实践教程|搭建电商 AI 无限画布,实现百款商品主图自动化批量生成
运维·人工智能·自动化
朴马丁4 小时前
从制造到智造:PLM如何赋能企业研发创新
大数据·运维·人工智能·食品行业·流程行业plm·化工新材料行业·新能源材料行业
爱小黄5 小时前
使用docker搭建集群-使用 Docker 搭建 KingbaseES 集群
运维·docker·容器
zhougl9965 小时前
Gateway 和 Nginx 路由区别
运维·nginx·gateway
听风3476 小时前
Arch Linux 软件安装完全指南
linux·运维·archlinux·pacman