Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: libcudnn.so.8: cannot open shared object file: No such file or directory #36

Open
Hzzhang-nlp opened this issue Sep 11, 2023 · 12 comments

Comments

@Hzzhang-nlp
Copy link

image

@shuxueslpi
Copy link
Owner

cuda确定环境ok吗?import torch怎么就报错了?

@Hzzhang-nlp
Copy link
Author

cuda确定环境ok吗?import torch怎么就报错了?

conda创建一个虚拟环境,然后进入克隆的你这个项目的仓库里pip install -r requirements.txt,然后再去运行训练代码就报了这个错,我其他两个虚拟环境的pytorch都没问题

@shuxueslpi
Copy link
Owner

你创建环境后,单独装一次pytorch,然后再装requirements里的依赖试试,你这个就是基础环境的问题,我还是建议用docker

@Hzzhang-nlp
Copy link
Author

自己的台式机啊,怎么用docker?你那个requirements.txt应该把torch也放进去吧?

@shuxueslpi
Copy link
Owner

windows的台式机也可以装docker
默认你是有完整的torch-gpu环境的,这部分环境的搭建可能每个人都有细微差异,否则也运行不了transformers
最统一的方式就是从docker开始,屏蔽了很多基础环境问题

@shuxueslpi
Copy link
Owner

https://pytorch.org/get-started/locally/#start-locally
看下这里windows的安装命令

@Hzzhang-nlp
Copy link
Author

https://pytorch.org/get-started/locally/#start-locally 看下这里windows的安装命令

安装我肯定会啊,我的意思是最好requirements.txt文件里把该包含的库都包含了,一键启动,开箱即用多方便

@shuxueslpi
Copy link
Owner

但torch的安装命令不是唯一的,所以我提供的开箱即用的环境是docker环境,即使是transformers官方也没有直接一键即用,也要先安装好torch,tensorflow或jax

@Hzzhang-nlp
Copy link
Author

我台式机装的ubuntu系统,昨晚我直接安装requirements.txt后用pip list查看时有torch的,好的,我回去试试,先安装torch,再pip install -r requirements.txt

@shuxueslpi
Copy link
Owner

我也是台式机ubuntu,装的docker,更建议你用docker

@Hzzhang-nlp
Copy link
Author

好的

@Hzzhang-nlp
Copy link
Author

我也是台式机ubuntu,装的docker,更建议你用docker

环境没问题了,但是一加载模型,就被killed,3060的显存,还是没法直接加载ChatGLM-6B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants